Difference between now() and today() in Appian ?
Difference between now() and today() in Appian ?
Answer
The two functions differ in whether they include a time, what data type they return, and how they relate to the time zone.
now():
now() returns the current date and time as a DateTime. It is time zone aware, using the system or user time zone.
Use it when you need an exact timestamp, such as logging, audit trails, or comparing against other DateTime values.
today() :
today() returns only the current date, as a Date. It depends on the time zone indirectly: the date comes from the system time zone, but no time is stored.
Use it when only the date matters, like filtering records by date or building daily reports.
A common mistake
Comparing the two directly fails, because now() carries a time and today() doesn’t:
Compare the date parts instead:
Tip: To get a date a number of days from now, add that number to today(). It works the same way with now().
Try it yourself
Change the inputs or the expression and run it to see what it returns.
Independent evaluator: it approximates the Appian expression language and may differ from a real Appian environment. Verify anything that matters. Terms