# toDateTime

Converts a value to a datetime.

## Arguments

1. String or date to convert.
2. Optional: If the first argument is a date, you can specify a time as a string or time data type. Otherwise the local time 00:00 is used.

## Examples

| Expression | Result |
| --- | --- |
| toDateTime("2021-04-21") | 2021-04-21T00:00Z |