I'm having trouble with the following in saved sea...
# suiteanalytics
g
I'm having trouble with the following in saved search criteria: CASE WHEN {usernotes.notedate} >= {today}-7 THEN 1 ELSE 0 END. It works, but it's taking time into account, and it needs to be based on the day only. What do i need to do to it?
a
use trunc to truncate the field to only date then compare
g
@Ankur Sanghi Thanks! Do I have to specify a format like 'mm/dd/yyyy'?
a
In your example it would be trunc({datefield}, 'DDD') - i think. please validate that it works... or experiment some more
g
Thank you! I'll see what I come up with.
CASE WHEN TRUNC({usernotes.notedate}) >= TRUNC({today})-7 THEN 1 ELSE 0 END - no format needed and it seems to be working! Thanks again!