I am pulling a date from a table called 'date changed'. I am trying to check if that date was changed more than 14 days ago. If its been changed in the last 14 days, no issues. If it hasnt been changed in 14 days, then output something. Ive tried the code below and it seems to be converting my date into a number? Just trying to figure out what to do
Date of last Substance use assessment: {=date changed} {if: date changed > {time: 'YYYY-MM-DD' shift=-14D}}Yes{else}No{endif}
The datetimediff function would be helpful for this.
Here is an example:
{datechanged="2024-12-09"}
{if: datetimediff(datechanged, {time: YYYY-MM-DD}, "D") <=14}
Changed in the last 14 days!
{else}
Not changed in the last 14 days
{endif}
Check out the Date Time Functions section of the formula reference:
Thanks for your help on this.... I think the issue is its pulling the date from Datablaze and its causing some issues... but you might know better than me.