Date

Extended supports Dates. These can be written in the ISO 8601 standard format YYYY-MM-DD. Dates are actually stored at the millisecond level and the hours, minutes, seconds, and milliseconds are automatically set to 0 for the specified day. Hours are measured according to the 24-hour clock, commonly known as military time.

2015-06-01              // Jun 1, 2015 00:00:00
myDate := 2012-10-23
myDate                  // Oct 23, 2012 00:00:00

Keywords

There are several keywords that evaluate to dates.

Keyword

Return Value

TODAY

Current date and time, taken from the server time

BOP

Start date of the current context period

EOP

End date of the current context period

BOY

Start of the calendar year that the current context period corresponds to

EOY

End of the calendar year that the current context period corresponds to

Examples

TODAY           // (At the time of writing) Sep 10, 2021 17:13:11
BOP             // Sep 1, 2021 00:00:00
EOP             // Sep 30, 2021 23:59:59
BOY             // Jan 1, 2021 00:00:00
EOY             // Dec 31, 2021 23:59:59

Time Adjustments

Dates can be adjusted using any of the traditional modifiers found in the Function Calculator.

BOP - 1M            // Aug 1, 2021 00:00:00
EOP - 1Y            // Sep 30, 2020 23:59:59
BOY + 3Y            // Jan 1, 2024 00:00:00
TODAY + EM          // (At the time of writing) Sep 30, 2021 23:59:59

Functions

date

The date() function converts a string to a date.

Syntax

Return Value

date(<string>)

Date representation of string

string

The string to be converted to a date

Examples

date("04-07-2018")          // Jul 4, 2018 00:00:00
date("17/05/2018")          // May 17, 2018 00:00:00