When using Test filter, how do I capture todays date -65?
SQL Statement would read "Field_1" >=(GetDate()-65)
When using Test filter, how do I capture todays date -65?
SQL Statement would read "Field_1" >=(GetDate()-65)
Best answer by chrisatsafe
Hi @sigmadon_max,
If you want to use a Date/Time Function for the right value of the Tester, you will want to set the right value to something like:
@DateTimeAdd(@DateTimeFormat(@DateTimeNow(),%Y%m%d),-P65D)
Note: you will want the dates to be formatted the same so you may not necessarily use %Y%m%d.
The Date/Time Functions documentation will be an excellent resource to learn more about formatting, etc.
Alternatively, you can use something like the DateTimeStamper to create a new attribute for today's date, followed by a DateTimeCalculator to subtract 65 days (and a DateTimeConverter to format it accordingly). Then, simply set the right value of the Tester to the newly created date attribute - you can remove this attribute after testing.
Hope this helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.