Datetime Utc To Local
datetime_utc_to_local
The datetime_utc_to_local function converts a UTC datetime value to local time in the named timezone.
Spec
datetime_utc_to_local(datetime, timezone)Parameters
datetime - The UTC datetime value to convert.
timezone - A system timezone identifier, e.g. "EST" or "Pacific Standard Time".Return Value
A datetime value adjusted to the specified local time. Returns null if the timezone identifier is not recognized.Example
Convert UTC to Eastern Standard Time (UTC-5):
datatable(dt:datetime)[datetime(2025-08-05T12:00:00Z)]
| extend local_dt = datetime_utc_to_local(dt, "EST")| dt | local_dt |
|---|---|
| 2025-08-05T12:00:00Z | 2025-08-05T07:00:00.00Z |