Time period codes
All the examples are in relation to date 2017-08-26. To form a code, take a word from the left and match it with the number at the top (e.g. MONTHS-1) to get the example values.
2017-08-26 | 0 | 1 | 2 | 3 |
---|---|---|---|---|
DAYS |
|
|
|
|
DATE |
|
|
|
|
CALWEEK |
|
|
|
|
CALMONTHS |
|
|
|
|
CALMONTH |
|
|
|
|
MONTHS |
|
|
|
|
YEARS |
|
|
|
|
CALYEAR |
|
|
|
|
CALQUARTER |
|
|
|
|
CALHALFYEAR |
|
|
|
|
CALENDYEAR |
|
|
|
|
CALENDMONTH |
|
|
|
|
CALENDQUARTER |
|
|
|
|
CALYEARMONTH |
|
|
|
|
If you add prefix R (e.g RCALMONTH), the time period code is converted to:
CALMONTH, if the given date is the last day of the month
MONTH, if the given date is not the last day of the month
GIVEN means from start date till end date.