Hello everyone.
I've working with a big dataset stored in an enterprise geodatabase, months ago I upload a service that use a definition query that use dates as in DateField <= current_timestamp - 1
Now I´m wondering how to use the DATEPART function to do something similar, the expression is:
Day BETWEEN 1 AND DATEPART(DAY, CURRENT_DATE)
All of the keywords except "DAY" are suggested by PRO, I also tried:
DATEPART(dd, CURRENT_DATE)
DATEPART(d, CURRENT_DATE)
DATEPART(DAY FROM CURRENT_DATE)
And no one works (The SQL expression has invalid syntax.), where is the issue?