> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# DateTime

> Use the Sigma DateTime function to convert text or date values into ISO date time format.

Converts a text or date value into an ISO date time.

## Usage

`DateTime(input)`

**input** (required) The input to be returned as a date time. Input can be text or date. If providing a text input, it can represent a date or a date and time; acceptable formats for a text input include "yyyy-mm-dd", "mm/dd/yyyy", or "yyyy-mm-dd hh:mm:ss" (use double quotes).

## Examples

```
DateTime("03/07/2023")
```

* Returns the ISO date time 2023-03-07 00:00:00.

```
DateTime("2023-03-07 15:27:45")
```

* Returns the ISO date time 2023-03-07 15:27:45.

```
DateTime([Text Date])
```

* Returns the corresponding ISO date time for each value in the `[Text Date]` column.

## Related resources

* [Date](/docs/date)
* <a href="https://quickstarts.sigmacomputing.com/guide/common_date_functions/index.html" target="_blank" rel="noopener noreferrer">
    Quickstart: Common date functions and use cases
  </a>