---
updatedAt: 2025-05-20T20:29:16.000Z
agentTools:
  projectIndex: https://docs.documotor.com/llms.txt
---

# Datetime functions

Functions for working with dates

These functions allow you to easily convert between time zones, calculate future dates, or format dates according to regional standards. Occasionally, you'll need IANA language tags to select your region, e.g., `en-US`. For reference, you can use the [full list](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) of languages and regions. For a full region identifier, combine a language tag with a country tag like in the `en-US` example.

| Function                                                         | Description                                            |
| :--------------------------------------------------------------- | :----------------------------------------------------- |
| [`add_time`](https://docs.documotor.com/docs/add_time)                                       | Add a time increment to a given datetime.              |
| [`current_time`](https://docs.documotor.com/docs/current_time)                               | Return current time offset by a given number of hours. |
| [`format_datetime_to_timezone`](https://docs.documotor.com/docs/format_datetime_to_timezone) | Set a timezone for a datetime object and format it.    |
| [`to_datetime`](https://docs.documotor.com/docs/to_datetime)                                 | Convert a string object to datetime.                   |