Date Time Math expression – adding time to a date¶
The date time math expression adds a number of time units to a date or subtracts them – "creation date + 3 days", "now – 2 hours". Optionally it counts in the working time of a business hours calendar, for example "3 business days after receipt".
1. At a glance¶
| Purpose | Adds or subtracts days, hours, months … to or from a date |
| Typical use | Due dates, reminder times, deadlines in business hours |
| Returns | Date and time, as text in ISO 8601 format (for example 2026-10-23T09:00:00.0000000) |
| Related | Duration (time between two dates), Business hours, rule DateTimeAdd of Modify Value |
2. Settings¶
| Setting | Meaning | Default |
|---|---|---|
| "Base Value" | The date the offset is applied to, for example a date field or the system function ServerDateTimeUtc |
– (required) |
| "Number" | How many units are added. A negative number subtracts. Decimals are allowed (1.5), with a decimal point. |
– (required) |
| "Unit" | The unit: Milliseconds, Seconds, Minutes, Hours, Days, Weeks, Months or Years – in the plural, upper or lower case |
– (required) |
| "Use Business Hours" | Counts in the working time of a business hours calendar | off |
| "Unit interpretation" | Only with business hours: how the unit is read (section 3) | "Business calendar units (days and weeks are business days)" |
| "Use Business Hours By Expression" | Only with business hours: the calendar is determined by an expression instead of being selected | off |
| "Business Hours" | The business hours calendar | – |
| "Business Hours Expression" | Only with "Use Business Hours By Expression": an expression that returns the id or the name of the calendar | – |
All three main settings are expressions. For fixed values, type the number (3) or the unit
(Days) directly into the setting.
3. Behaviour¶
Without business hours¶
The units are added on the calendar. Months and Years only use the whole part of the number
(1.5 months count as 1 month); adding one month to 31 January gives the last day of February.
With business hours¶
| "Unit interpretation" | Effect |
|---|---|
| "Business calendar units (days and weeks are business days)" | Hours and smaller units are working time. Days and Weeks count business days and keep the time of day. Months and Years are calendar arithmetic. Finally, the result is moved to the next valid working time. Fractions of days, weeks, months and years are rounded to whole units. |
| "Elapsed business time (a day is 24 working hours)" | Every unit is converted into working time: a day is 24 working hours, a week 168, a month 30 days and a year 365 days of working time. |
If no calendar can be determined – none selected, or the expression returns an unknown name – the expression calculates on the calendar as without business hours.
When something is wrong¶
The result is empty when the number is not a number or the unit is not one of the names above.
A singular such as Day is not accepted. If the base value is empty, the calculation starts at
1 January 1753.
4. Examples¶
Due date in 3 days: Base Value = field "Created on", Number = 3, Unit = Days.
One hour ago: Base Value = system function ServerDateTimeUtc, Number = -1, Unit = Hours.
Response time of 4 working hours: Base Value = field "Received on", Number = 4, Unit =
Hours, "Use Business Hours" on, "Business Hours" = "Service desk Mon–Fri 8–17". A ticket
received on Friday at 15:30 gets the value Monday 10:30.