OQL DATEDIFF and Current Date Time

0
Searched the forum and thought I had found a solution... Version 4.3.2, trying to: Where DateDiff ( Day, Date, '[%CurrentDateTime%]') < 365 Anyone found a way to get this? Thanks!
asked
1 answers
3

I don't believe you can do what you want through this OQL function. You can do something like

AND DATEDIFF(YEAR, DateStarted, DateCompleted) > 1

but you cannot replace these attributes with the current datetime token. Instead, you can try setting up a date range parameter and use

AND DateStarted IN $dateRange

The users can then enter the date range to report on in the reporting form.

As another alternative, you can add a Datetime parameter and set it to a Date Constraint of Last Year daterange

answered