This content has been marked as final. Show 4 replies
I am trying to use the yeartodate() function in the following way:
REPORT_YTD is a distinct value (a date).
My issue is simple, this function should provide me exactly what I need but something is happening with the ref_timestamp (REPORT_YTD). If I remove this ref_timestamp and just let the function default to today's date I get the results I want, but if I include this variable which is a few days earlier than today's date, I get values twice the size.
As a final test, if I simply write the date (e.g. '2011-02-18') instead of using the field, then I get the correct values!!
One work around I can see (failing to get help on this issue) is to test the dates, so part 2 of my question is to evaluate dates (i.e. < = <=, >, ) can someone please shed some light on the correct evaluation syntax for date fields?