Display future date

I would like to chage the displayed date to different than todays date, but be BASED on todays date. So using, [[Now.toLocaleDateString()]] I can get the date I want, but how to change it to a date in the past or future is where I’m stuck.

Use the addDays() function. You can pass it a positive number for days in the future, or a negative number for days in the past.

[[Now.addDays(4)]] // four days from now
[[Now.addDays(-10)]] // ten days ago

Then just chain it all together:


You can also use addMonths(), addYears(), and addHours(). If you open the expression editor (the fx button in the case editor next to value) there’s a dropdown in the top left corner where you can see all the date functions available to you.


Perfect! This worked really well, and I learned something new!

Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.