> 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/conversion-functions/totime.md).

# ToTime

Converts value to the time type

```mathematica
ToTime("12:45",TimeFormatTemplateOption.`HH:mm`) → 12:45:00.000
ToTime("13:19:45.001",TimeFormatTemplateOption.`HH:mm:ss.SSS`) → 13:19:45.001
```

#### Inputs

`ToTime(value, format, [location], [replaceInvalidWith])`

* `value` - A value to convert into a time
* `format` - Enum ‘TimeFormatTemplateOption’ with the corresponding format of the value, TimeFormatTemplateOption.`HH:mm`
* `[location]` - **\[optional**: UTC by default\*\*]\*\*
* `[replaceInvalidWith]` - **\[optional**: null by default\*\*]\*\* - invalid values will be replaced with this parameter

#### Description

You have to select the actual (not output) format of the value in the second parameter.
