> ## Documentation Index
> Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://axiom.co/docs/feedback

```json
{
  "path": "/apl/scalar-functions/datetime-functions",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Datetime functions

> Learn how to use and combine different datetime functions in APL

The table summarizes the datetime functions available in APL.

| Name                                                                                                            | Description                                                                                                          |
| --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [ago](/apl/scalar-functions/datetime-functions/ago)                                                             | Subtracts the given timespan from the current UTC clock time.                                                        |
| [datetime\_add](/apl/scalar-functions/datetime-functions/datetime-add)                                          | Calculates a new datetime from a specified datepart multiplied by a specified amount, added to a specified datetime. |
| [datetime\_diff](/apl/scalar-functions/datetime-functions/datetime-diff)                                        | Calculates the calendarian difference between two datetime values.                                                   |
| [datetime\_part](/apl/scalar-functions/datetime-functions/datetime-part)                                        | Extracts the requested date part as an integer value.                                                                |
| [dayofmonth](/apl/scalar-functions/datetime-functions/dayofmonth)                                               | Returns the integer number representing the day number of the given month.                                           |
| [dayofweek](/apl/scalar-functions/datetime-functions/dayofweek)                                                 | Returns the integer number of days since the preceding Sunday.                                                       |
| [dayofyear](/apl/scalar-functions/datetime-functions/dayofyear)                                                 | Returns the integer number representing the day number of the given year.                                            |
| [endofday](/apl/scalar-functions/datetime-functions/endofday)                                                   | Returns the end of the day containing the date.                                                                      |
| [endofmonth](/apl/scalar-functions/datetime-functions/endofmonth)                                               | Returns the end of the month containing the date.                                                                    |
| [endofweek](/apl/scalar-functions/datetime-functions/endofweek)                                                 | Returns the end of the week containing the date.                                                                     |
| [endofyear](/apl/scalar-functions/datetime-functions/endofyear)                                                 | Returns the end of the year containing the date.                                                                     |
| [getmonth](/apl/scalar-functions/datetime-functions/getmonth)                                                   | Returns the month number (1-12) from a datetime.                                                                     |
| [getyear](/apl/scalar-functions/datetime-functions/getyear)                                                     | Returns the year part of the datetime argument.                                                                      |
| [hourofday](/apl/scalar-functions/datetime-functions/hourofday)                                                 | Returns the integer number representing the hour number of the given date.                                           |
| [monthofyear](/apl/scalar-functions/datetime-functions/monthofyear)                                             | Returns the integer number representing the month number of the given year.                                          |
| [now](/apl/scalar-functions/datetime-functions/now)                                                             | Returns the current UTC clock time, optionally offset by a given timespan.                                           |
| [startofday](/apl/scalar-functions/datetime-functions/startofday)                                               | Returns the start of the day containing the date.                                                                    |
| [startofmonth](/apl/scalar-functions/datetime-functions/startofmonth)                                           | Returns the start of the month containing the date.                                                                  |
| [startofweek](/apl/scalar-functions/datetime-functions/startofweek)                                             | Returns the start of the week containing the date.                                                                   |
| [startofyear](/apl/scalar-functions/datetime-functions/startofyear)                                             | Returns the start of the year containing the date.                                                                   |
| [unixtime\_microseconds\_todatetime](/apl/scalar-functions/datetime-functions/unixtime-microseconds-todatetime) | Converts a Unix timestamp expressed in whole microseconds to an APL `datetime` value.                                |
| [unixtime\_milliseconds\_todatetime](/apl/scalar-functions/datetime-functions/unixtime-milliseconds-todatetime) | Converts a Unix timestamp expressed in whole milliseconds to an APL `datetime` value.                                |
| [unixtime\_nanoseconds\_todatetime](/apl/scalar-functions/datetime-functions/unixtime-nanoseconds-todatetime)   | Converts a Unix timestamp expressed in whole nanoseconds to an APL `datetime` value.                                 |
| [unixtime\_seconds\_todatetime](/apl/scalar-functions/datetime-functions/unixtime-seconds-todatetime)           | Converts a Unix timestamp expressed in whole seconds to an APL `datetime` value.                                     |
| [week\_of\_year](/apl/scalar-functions/datetime-functions/week-of-year)                                         | Returns 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](/apl/data-types/scalar-data-types#supported-formats).
