Skip to main content
The table summarizes the datetime functions available in APL.
NameDescription
agoSubtracts the given timespan from the current UTC clock time.
datetime_addCalculates a new datetime from a specified datepart multiplied by a specified amount, added to a specified datetime.
datetime_diffCalculates the calendarian difference between two datetime values.
datetime_partExtracts the requested date part as an integer value.
dayofmonthReturns the integer number representing the day number of the given month.
dayofweekReturns the integer number of days since the preceding Sunday.
dayofyearReturns the integer number representing the day number of the given year.
endofdayReturns the end of the day containing the date.
endofmonthReturns the end of the month containing the date.
endofweekReturns the end of the week containing the date.
endofyearReturns the end of the year containing the date.
getmonthReturns the month number (1-12) from a datetime.
getyearReturns the year part of the datetime argument.
hourofdayReturns the integer number representing the hour number of the given date.
monthofyearReturns the integer number representing the month number of the given year.
nowReturns the current UTC clock time, optionally offset by a given timespan.
startofdayReturns the start of the day containing the date.
startofmonthReturns the start of the month containing the date.
startofweekReturns the start of the week containing the date.
startofyearReturns the start of the year containing the date.
unixtime_microseconds_todatetimeConverts a Unix timestamp expressed in whole microseconds to an APL datetime value.
unixtime_milliseconds_todatetimeConverts a Unix timestamp expressed in whole milliseconds to an APL datetime value.
unixtime_nanoseconds_todatetimeConverts a Unix timestamp expressed in whole nanoseconds to an APL datetime value.
unixtime_seconds_todatetimeConverts a Unix timestamp expressed in whole seconds to an APL datetime value.
week_of_yearReturns the ISO 8601 week number from a datetime expression.
Axiom supports the ISO 8601 format which is the standard format for representing dates and times in the Gregorian calendar. For more information, see Supported formats.