> For the complete documentation index, see [llms.txt](https://docs.tomat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tomat.ai/data-transformation/formulas/date-and-time-functions/datetime.md).

# DateTime

Creates a datetime from string based on the specified format

```mathematica
DateTime("2023-01-01 9:56:01", DateTimeFormatTemplateOption.`yyyy*MM*dd HH:mm:ss`) → 2023-01-01 09:56:01.000
DateTime("23 Jan 11:56", DateTimeFormatTemplateOption.`dd*shortMonth HH:mm`) → 0000-01-23 11:56:00.000
```

#### Inputs

`DateTime(string, [format])`

* `string` - A string that contains a date in a special format
* `[format]` - Format of the `string`, [**Supported Date and Time Parts**](https://www.notion.so/Supported-Date-and-Time-Parts-aa26c9f4116f47de903d49a19a5e4541?pvs=21), ex. DateTimeFormatTemplateOption.`dd*shortMonth HH:mm`
