Functions for dates

Date functions can be used in expressions.

Date functions can set an object field, be is used in an if/else statement, or be used by other functions. There are also two system variables for dates, [$TODAY$] and [$DaysFromNow/$].

The following functions can be used for dates:

Table 1. Functions for dates
Function Description Syntax
add_days Result is a date, the date given plus the number of days given. Requires two arguments.

If date is a list of dates, the add_days function is applied to all items in the list. The result is a list of dates.

add_days(date,number)

Example:

add_days(2025-10-10, 2) result is 2025-10-12.
add_months Result is a date, the date given plus the number of months given. Requires two arguments.

If date is a list of dates, the add_months function is applied to all items in the list. The result is a list of dates.

add_months(date,number)

Example:

add_months(2025-10-10, 2) result is 2025-12-10.
add_year Result is a date, the date given plus the number of years given. Requires two arguments.

If date is a list of dates, the add_year function is applied to all items in the list. The result is a list of dates.

add_years(date,number)

Example:

add_years(2023-10-10, -2) result is 2021-10-10.
end_of_month Result is a date that is the last day of the month, relative to the month in the date given. Requires one argument.

If date is a list of dates, the end_of_month function is applied to all items in the list. The result is a list of month-end dates.

end_of_month(date)

Example:

end_of_month(2025-10-10) result is 2025-10-31, if the date is in October

end_of_month([$D1$]) result is 2025-10-31 if the date is in October

end_of_quarter Result is a date that is the last day of the quarter, relative to the date given. Requires one argument.

If date is a list of dates, the end_of_quarter function is applied to all items in the list. The result is a list of quarter-end dates.

end_of_quarter(date)

Example:

end_of_quarter(2025-10-10) result is 2025-12-31.
end_of_year Result is date that is the last day of the year, relative to the date given. Requires one argument.

If date is a list of dates, the end_of_year function is applied to all items in the list. The result is a list of year-end dates.

end_of_year(date)

Example:

end_of_year(2025-10-10) result is 2025-12-31.
today Result is today's date. Requires no argument.

today()

Example:

[$D1$] == (today)
tomorrow Result is tomorrow's date. Requires no argument.

tomorrow()

Example:

[$D1$] == (tomorrow)
yesterday Result is yesterday's date. Requires no argument.

yesterday()

Example:

[$D1$] == (yesterday)

Regardless of how dates are displayed in your locale, the following expressions are valid:

Table 2. Examples of expressions that use dates
Expression Result Note
[$TODAY$] 2025-11-09 Given that today's date is November 9, 2025
[$TODAY$]+10 2025-11-19 Given that today's date is November 9, 2025
2025-10-10 +30 2025-11-09  
format (2025-10-10 +30) November 9, 2025  
end_of_month(today()) 2025-11-30 Given that today's date is in November 2025
format (end_of_month(today())) November 30, 2025 Given that today's date is in November 2025
format (end_of_quarter(today())) December 31, 2025 Given that today's date is in October, November, or December 2025