Date expression syntax

Date expression syntax

In the context of date expressions, syntax refers to the rules about how keywords can be arranged and connected to form date expressions that ActivityHD can accurately interpret.

The following rules describe acceptable combinations of keywords. If keywords are enclosed in single brackets, pick one of the keywords. Keywords or combinations enclosed in double brackets are optional.

Tip

You only need to enter enough of a keyword to ensure it is unique among the other keywords. For example, instead of "Friday of last week" you could enter "Fri of la week".

If an abbreviation could stand for more than one keyword, ActivityHD uses the one that fits where it appears. For example, in today + 2 w, "w" means weeks, but "wo" means workdays and "b" means business days. At the start of an expression, "b" still means beginning. If an abbreviation still fits more than one keyword, an error lists the keywords it could mean.

[YESTERDAY | TODAY | TOMORROW]

Examples

yesterday Returns yesterday's date. If today is Tuesday, 11/03/2026, the expression returns Monday, 11/02/2026.
today Returns today's date.
tomorrow Returns tomorrow's date. If today is Tuesday, 11/03/2026, the expression returns Wednesday, 11/04/2026.

[NEXT | FOLLOWING | PRIOR | LAST] BUSINESS DAY

Examples

next business day or following business day Returns the next weekday after today. If the current date is Friday, 11/06/2026, the expression returns Monday, 11/09/2026.
prior business day or last business day Returns the weekday before today. If the current date is Monday, 11/09/2026, the expression returns Friday, 11/06/2026.

This business day and current business day are not valid, because a weekend date could move either way. To move a date onto a business day, see the tip under the last rule in this topic.

[[THIS | CURRENT | LAST | PRIOR | NEXT | FOLLOWING]] [SUNDAY | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY]

Examples

Wednesday If the current date is Monday, 11/02/2026, the expression returns Wednesday, 11/04/2026. Similarly, if the current date is Friday, 11/06/2026, the expression returns Wednesday, 11/04/2026.
next Thursday or following Thursday Returns the date of Thursday in the next week. If the current date is Wednesday, 11/04/2026, the expression returns Thursday, 11/12/2026.
prior Monday or last Monday Returns the date of Monday in the prior week. If the current date is Thursday, 11/05/2026, the expression returns Monday, 10/26/2026.
this Friday or current Friday Returns the date of Friday in the current week (Sunday through Saturday). If the current date is Tuesday, 11/03/2026, the expression returns Friday, 11/06/2026.

[SUNDAY | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY] [[OF [THIS | CURRENT | LAST | PRIOR | NEXT | FOLLOWING] WEEK]]

Examples

Wednesday If the current date is Monday, 11/02/2026, the expression returns Wednesday, 11/04/2026. Similarly, if the current date is Friday, 11/06/2026, the expression returns Wednesday, 11/04/2026.
Thursday of next week or Thursday of following week Returns the date of Thursday in the next week. If the current date is Wednesday, 11/04/2026, the expression returns Thursday, 11/12/2026.
Monday of prior week or Monday of last week Returns the date of Monday in the prior week. If the current date is Thursday, 11/05/2026, the expression returns Monday, 10/26/2026.
Friday of this week or Friday of current week Returns the date of Friday in the current week (Sunday through Saturday). If the current date is Tuesday, 11/03/2026, the expression returns Friday, 11/06/2026.

[BEGINNING | FIRST | END] [OF | OF NUMBER | OF +/- NUMBER | OF THIS | OF CURRENT | OF LAST | OF PRIOR | OF NEXT | OF FOLLOWING] [WEEK(S) | MONTH(S) | QUARTER(S) | YEAR(S)]

Examples

beginning of this week Returns the date of the beginning of the current week. If the current date is Friday, 11/06/2026, the expression returns Sunday, 11/01/2026.
beginning of January Returns the first day of January for the current year. If the current year is 2026, the expression returns 01/01/2026.
end of next June or end of following June Returns the last day of June of next year. If the current year is 2026, the expression returns 06/30/2027.
beginning of prior July or beginning of last July Returns the first day of July of the prior year. If the current year is 2026, the expression returns 07/01/2025.
beginning of -2 June Returns the first day of June two years ago. If the current year is 2026, the expression returns 06/01/2024.
beginning of quarter Returns the first day of the current quarter. If the current quarter is Q3 of 2026, the expression returns 07/01/2026.
end of Q2 Returns the last day of the second quarter of the current year. If the year is 2026, the expression returns 06/30/2026.

[BEGINNING | FIRST | END] [[OF | OF NUMBER | OF +/- NUMBER | OF THIS | OF CURRENT | OF LAST | OF PRIOR | OF NEXT | OF FOLLOWING]] [PERIODS] [NUMBER] [[OF | OF NUMBER | OF +/- NUMBER | OF THIS | OF CURRENT | OF LAST | OF PRIOR | OF NEXT | OF FOLLOWING] [YEAR] [QSTRING] OF [CALENDAR]]

Examples

Tip

Users often want to know how to create a date expression for the end date of a particular calendar's year. To do that, start at the beginning of the calendar's first period of next year and back up one day:

beginning of period 1 of next year of calendar "Fiscal" - 1 day Returns the date of the last day of the previous calendar year for calendar "Fiscal".
end of January -3 Returns the date of the end of January of the current year minus 3 days. If the current year is 2026, the expression returns 01/28/2026.
beginning of period of last year of calendar "month" Returns the date for the beginning of the current period of last year in the calendar "month", where "month" is the name of a calendar defined in the system.
end of period 1 of calendar "main" Returns the date of the end of period 1 for the calendar "main", where "main" is the name of a calendar defined in the system.
beginning of +2 periods of calendar "main" Returns the date of the beginning of the period which is 2 periods after the period that contains today's date in the calendar "main", where "main" is the name of a calendar defined in the system.
beginning of period +3 months Returns the date for the beginning of the current period plus 3 months. If the current period began on 04/01/2026, the expression returns 07/01/2026.
beginning of period 1 of calendar "month" + 6 days Returns the date for the beginning of period 1 of the calendar "month" plus 6 days, where "month" is the name of a calendar defined in the system. If the beginning of period 1 is 01/01/2026, the expression returns 01/07/2026.
end of period - 1 year Returns the date for the end of the current period minus 1 year. If the current period ends on 06/30/2026, the expression returns 06/30/2025.
today + 3 months Returns the date 3 months from today. If the current date is 05/21/2026, the expression returns 08/21/2026.

[DATE EXPRESSION] [+ | -] [NUMBER] [DAYS | WEEKS | MONTHS | QUARTERS | YEARS | BUSINESS DAYS]

Business days are Monday through Friday. When you add or subtract business days, the starting date is not counted and Saturdays and Sundays are skipped. Holidays are not skipped. You can also enter businessdays, workdays, or work days, and each unit can be singular or plural.

The rest of the expression keeps its calendar meaning. For example, end of month is the last day of the month even when that day falls on a weekend.

Examples

Tip

To move a date onto a business day, go one business day in one direction and then one back:

prior business day + 1 business day Returns today if today is a business day. Otherwise it returns the following Monday. If the current date is Sunday, 11/08/2026, the expression returns Monday, 11/09/2026.
next business day - 1 business day Returns today if today is a business day. Otherwise it returns the preceding Friday. If the current date is Sunday, 11/08/2026, the expression returns Friday, 11/06/2026.
end of month + 1 business day - 1 business day Returns the last business day of the current month. In October 2026, the month ends on Saturday, 10/31/2026, so the expression returns Friday, 10/30/2026.
today + 5 business days If the current date is Friday, 11/06/2026, the expression returns Friday, 11/13/2026.
end of month - 2 business days If the current month is April 2026, which ends on Thursday, 04/30/2026, the expression returns Tuesday, 04/28/2026.
today + 1 business day If the current date is Saturday, 11/07/2026, the expression returns Monday, 11/09/2026. From the same date, today - 1 business day returns Friday, 11/06/2026.