Forum Discussion

vrice's avatar
vrice
Cloud Apps
03-21-2023

Days Since [Days in Date] Issue - Unexpected token

Hi, 

In the past this formula worked for me to count the number of days since a date:

DDiff(NOW([Days in date]),[Days in date])

but now I am seeing this error* Function Syntax Error: Unexpected token 'DDiff(NOW'

*screenshot attached

Has anyone else experienced this? Does anyone know how to fix it?

TIA!

2 Replies

Replies have been turned off for this discussion
  • HamzaJ's avatar
    HamzaJ
    Data Integration

    Hey vrice 

    I dont know if this will help you, however I also experienced something similar with a different formula. The solution (eventually) was to write the formula from scratch. 

    Otherwise if you recently enabled the Analytical Engine then these kinds of formulas need to be aggregated. Try enclosing it with min,max, avg etc .

    Hope it helps

    Hamza

     

  • With the new Analytical Engine you don't use the date variable with NOW.  Your ex.  DDiff(NOW(),[Days in date]) except you have to wrap the DDiff in an aggregation.  Ex. avg(DDiff(startTime, NOW()))

    Hope this helps, Jim