Period expressions
A period expression describes an accounting period relative to the current period of a calendar.
The most common period expression is "CURRENT" or its equivalent of an empty string "".
Period expressions consist of keywords, numeric constants, string constants, and/or codes strung together using appropriate syntax.
Note
To help you interpret the syntax models that follow, keep these things in mind:
- Brackets "[ ]" indicate that the item enclosed is optional.
- A vertical pipe "|" indicates "or".
- NUMBER represents a numerical constant; it is interpreted as an Excel date number.
- STRING represents a string constant; it is interpreted as a date in SQL Server constant date format.
There are two basic types of period expressions:
- Current. This type of period expression has the following general syntax:
[CURRENT] [PERIOD]
[[+/-] NUMBER] [PERIOD | PERIODS | YEAR | YEARS] Examples
- CURRENT
- CURRENT PERIOD
- CURRENT - 1
- PERIOD 1
- CURRENT - 1 YEAR
- Literal. This type of period expression starts with the PERIOD keyword in conjunction with either the THROUGH keyword or the CONTAINING keyword and has the following general syntax:
- PERIOD THROUGH
- A numeric constant interpreted as an Excel date number.
- A string constant interpreted as a date in SQL Server constant date format.
- An optional YEAR or PERIOD keyword followed by an optional BEGIN or END keyword followed by an optional CURRENT keyword followed by an optional PERIOD keyword and then optional period offsets
In financial designs, an optional component of a period expression that represents additions or subtractions from the base period (usually CURRENT). Period offsets have the following general syntax: [+/-] NUMBER [PERIOD | PERIODS | YEAR | YEARS]. all followed by an optional OF CALENDAR.
- PERIOD THROUGH "2014-10-15"
- PERIOD THROUGH YEAR END
- PERIOD THROUGH CURRENT + 10
- PERIOD THROUGH CURRENT PERIOD + 1 YEAR
- PERIOD CONTAINING
- A numeric constant interpreted as an Excel date number.
- A string constant interpreted as a date in SQL Server constant date format.
- An optional YEAR or PERIOD keyword followed by an optional BEGIN or END keyword followed by an optional CURRENT keyword followed by an optional PERIOD keyword and then optional period offsets
In financial designs, an optional component of a period expression that represents additions or subtractions from the base period (usually CURRENT). Period offsets have the following general syntax: [+/-] NUMBER [PERIOD | PERIODS | YEAR | YEARS]. all followed by an optional OF CALENDAR.
- PERIOD CONTAINING "2014-10-15"
- PERIOD CONTAINING YEAR END
- PERIOD CONTAINING CURRENT + 10
- PERIOD CONTAINING CURRENT PERIOD + 1 YEAR
A "period through" expression starts with PERIOD THROUGH keywords and is followed by one of the following:
PERIOD THROUGH [[NUMBER] | [STRING] | [[YEAR | PERIOD] [BEGIN | END] [CURRENT] [PERIOD]
[[+/-] NUMBER] [PERIOD | PERIODS | YEAR | YEARS] ]] [OF CALENDAR]Examples
A "period containing" expression starts with PERIOD CONTAINING keywords and is followed by one of the following:
PERIOD CONTAINING [[NUMBER] | [STRING] | [[YEAR | PERIOD] [BEGIN | END] [CURRENT] [PERIOD]
[[+/-] NUMBER] [PERIOD | PERIODS | YEAR | YEARS] ]] [OF CALENDAR]Examples
These can be condensed to the following general syntax statement:
[PERIOD THROUGH | CONTAINING] [[NUMBER] | [STRING] | [[YEAR | PERIOD] [BEGIN | END] [CURRENT] [PERIOD]
[[+/-] NUMBER] [PERIOD | PERIODS | YEAR | YEARS] ]] [OF CALENDAR]
Sub-expressions
Sub-expressions can be components of larger expressions. For period expressions, there are two sub-expressions we'll consider: PERIOD NUMBER and OF CALENDAR.
- PERIOD NUMBER. A PERIOD NUMBER sub-expression has the following general syntax:
- PERIOD 1 OF 2006
- PERIOD 12 OF "2008"
- PERIOD 4 OF 2008 OF Quarterly
- OF CALENDAR. An OF CALENDAR sub-expression has the following general syntax:
- PERIOD THROUGH CURRENT OF "Quarterly"
- PERIOD CONTAINING "2014-10-15" OF Daily
PERIOD NUMBER [OF] [STRING] [OF CALENDAR]
Note
The STRING in this syntax statement is a string constant or code that is interpreted as a year code.
Examples
OF STRING
Note
The STRING in this syntax statement is a string constant or code that is interpreted as a calendar name.
Examples
Period offsets
Period offsets are additions or subtractions from the base period (typically, from CURRENT). The portion of the syntax examples cited above in red text represent the period offset. Period offsets can be used more than once (see the third example below).
A period offset has the following general syntax:
[+/-] NUMBER [PERIOD | PERIODS | YEAR | YEARS]
Examples
- CURRENT - 1
- CURRENT - 1 YEAR
- CURRENT - 1 PERIOD - 1 YEAR
Note
If no period or year is specified in a period offset statement, PERIOD or PERIODS is assumed.