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".

[YESTERDAY | TODAY | TOMORROW]

Examples

yesterday Returns yesterday's date. If today is Tuesday, 11/07/2023, the expression returns Monday, 11/06/2023.
today Returns today's date.
tomorrow Returns tomorrow's date. If today is Tuesday, 11/07/2023, the expression returns Wednesday, 11/08/2023.

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

Examples

Wednesday If the current date is Monday, 11/06/2023, the expression returns Wednesday, 11/08/2023. Similarly, if the current date is Friday, 11/10/2023, the expression returns Wednesday, 11/08/2023.
next Thursday or following Thursday Returns the date of Thursday in the next week. If the current date is Wednesday, 11/08/2023, the expression returns Thursday, 11/16/2023.
prior Monday or last Monday Returns the date of Monday in the prior week. If the current date is Thursday, 11/09/2023, the expression returns Monday, 10/30/2023.
this Friday or current Friday Returns the date of Friday in the current week (Sunday through Saturday). If the current date is Tuesday, 11/07/2023, the expression returns Friday, 11/10/2023.

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

Examples

Wednesday If the current date is Monday, 11/06/2023, the expression returns Wednesday, 11/08/2023. Similarly, if the current date is Friday, 11/10/2023, the expression returns Wednesday, 11/08/2023.
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/08/2023, the expression returns Thursday, 11/16/2023.
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/09/2023, the expression returns Monday, 10/30/2023.
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/07/2023, the expression returns Friday, 11/10/2023.

[BEGINNING | FIRST | END] [OF | OF NUMBER | OF +/- NUMBER | OF THIS | OF CURRENT | OF LAST | OF PRIOR | OF NEXT | OF FOLLOWING] [WEEKS | MONTHS | QUARTERS | YEARS]

Examples

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

[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 2023, the expression returns 01/28/2023.
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/2023, the expression returns 07/01/2023.
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/2023, the expression returns 01/07/2023.
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/2023, the expression returns 06/30/2022.
today + 3 months Returns the date 3 months from today. If the current date is 05/21/2023, the expression returns 08/21/2023.