Functions for dates
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:
| 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 |
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 |
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 |
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
|
Example: end_of_month(2025-10-10) 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 |
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 |
Example: end_of_year(2025-10-10) result is 2025-12-31. |
today
|
Result is today's date. Requires no argument. |
Example: [$D1$] ==
(today)
|
tomorrow
|
Result is tomorrow's date. Requires no argument. |
Example: [$D1$] ==
(tomorrow)
|
yesterday
|
Result is yesterday's date. Requires no argument. |
Example: [$D1$] ==
(yesterday)
|
Regardless of how dates are displayed in your locale, the following expressions are valid:
| 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 |