| Name | Description | 
|---|---|
| ago | Subtracts the given timespan from the current UTC clock time. | 
| datetime_add | Calculates a new datetime from a specified datepart multiplied by a specified amount, added to a specified datetime. | 
| datetime_part | Extracts the requested date part as an integer value. | 
| datetime_diff | Calculates calendarian difference between two datetime values. | 
| dayofmonth | Returns the integer number representing the day number of the given month | 
| dayofweek | Returns the integer number of days since the preceding Sunday, as a timespan. | 
| dayofyear | Returns the integer number represents the day number of the given year. | 
| endofyear | Returns the end of the year containing the date | 
| getmonth | Get the month number (1-12) from a datetime. | 
| getyear | Returns the year part of the datetimeargument. | 
| hourofday | Returns the integer number representing the hour number of the given date. | 
| endofday | Returns the end of the day containing the date. | 
| now | Returns the current UTC clock time, optionally offset by a given timespan. | 
| endofmonth | Returns the end of the month containing the date. | 
| endofweek | Returns the end of the week containing the date. | 
| monthofyear | Returns the integer number represents the month number of the given year. | 
| startofday | Returns the start of the day containing the date. | 
| startofmonth | Returns the start of the month containing the date. | 
| startofweek | Returns the start of the week containing the date. | 
| startofyear | Returns the start of the year containing the date. | 
| unixtime_microseconds_todatetime | Converts a Unix timestamp expressed in whole microseconds to an APL datetimevalue. | 
| unixtime_milliseconds_todatetime | Converts a Unix timestamp expressed in whole milliseconds to an APL datetimevalue. | 
| unixtime_nanoseconds_todatetime | Converts a Unix timestamp expressed in whole nanoseconds to an APL datetimevalue. | 
| unixtime_seconds_todatetime | Converts a Unix timestamp expressed in whole seconds to an APL datetimevalue. | 
| week_of_year | Returns the ISO 8601 week number from a datetime expression. | 
ago
Subtracts the given timespan from the current UTC clock time.Arguments
- Interval to subtract from the current UTC clock time
Returns
now() - a_timespanExample
- Result:
- Result:
datetime_add
Calculates a new datetime from a specified datepart multiplied by a specified amount, added to a specified datetime.Arguments
- period: string.
- amount: integer.
- datetime: datetime value.
Returns
A date after a certain time/date interval has been added.Example
- Result:
datetime_part
Extracts the requested date part as an integer value.Arguments
- date: datetime
- part: string
Returns
An integer representing the extracted part.Examples
- Result:
datetime_diff
Calculates calendarian difference between two datetime values.Arguments
- period: string.
- datetime_1: datetime value.
- datetime_2: datetime value.
Returns
An integer, which represents amount of periods in the result of subtraction (datetime_1 - datetime_2).Example
- Result:
- Result:
dayofmonth
Returns the integer number representing the day number of the given monthArguments
- a_date: A- datetime
Returns
day number of the given month.Example
- Result:
dayofweek
Returns the integer number of days since the preceding Sunday, as a timespan.Arguments
- a_date: A datetime.
Returns
Thetimespan since midnight at the beginning of the preceding Sunday, rounded down to an integer number of days.
Example
- Result:
dayofyear
Returns the integer number represents the day number of the given year.Arguments
- a_date: A- datetime.
Returns
day number of the given year.
Example
- Result:
endofyear
Returns the end of the year containing the dateArguments
- date: The input date.
Returns
A datetime representing the end of the year for the given date valueExample
- Result:
getmonth
Get the month number (1-12) from a datetime.getyear
Returns the year part of thedatetime argument.
Example
- Result:
hourofday
Returns the integer number representing the hour number of the given dateArguments
- a_date: A datetime.
Returns
hour number of the day (0-23).Example
- Result:
endofday
Returns the end of the day containing the dateArguments
- date: The input date.
Returns
A datetime representing the end of the day for the given date value.Example
- Result:
now
Returns the current UTC clock time, optionally offset by a given timespan. This function can be used multiple times in a statement and the clock time being referenced will be the same for all instances.Arguments
- offset: A timespan, added to the current UTC clock time. Default: 0.
Returns
The current UTC clock time as a datetime.Example
- Result:
endofmonth
Returns the end of the month containing the dateArguments
- date: The input date.
Returns
A datetime representing the end of the month for the given date value.Example
- Result:
endofweek
Returns the end of the week containing the dateArguments
- date: The input date.
Returns
A datetime representing the end of the week for the given date valueExample
- Result:
monthofyear
Returns the integer number represents the month number of the given year.Arguments
- date: A datetime.
Returns
month number of the given year.Example
- Result:
startofday
Returns the start of the day containing the dateArguments
- date: The input date.
Returns
A datetime representing the start of the day for the given date valueExamples
- Result:
startofmonth
Returns the start of the month containing the dateArguments
- date: The input date.
Returns
A datetime representing the start of the month for the given date valueExample
- Result:
- Result:
startofweek
Returns the start of the week containing the date Start of the week is considered to be a Sunday.Arguments
- date: The input date.
Returns
A datetime representing the start of the week for the given date valueExamples
- Result:
- Result:
startofyear
Returns the start of the year containing the dateArguments
- date: The input date.
Returns
A datetime representing the start of the year for the given date valueExamples
- Result:
- Result: