Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Converts UTC datetime to local datetime using a time-zone specification.
datetime_utc_to_local(
from,
timezone)
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
from | datetime |
✔️ | The UTC datetime to convert. |
timezone | string |
✔️ | The timezone to convert to. This value must be one of the supported timezones. |
A local datetime in the timezone that corresponds the UTC datetime.
print dt=now()
| extend pacific_dt = datetime_utc_to_local(dt, 'US/Pacific'), canberra_dt = datetime_utc_to_local(dt, 'Australia/Canberra')
| extend diff = pacific_dt - canberra_dt
Output
dt | pacific_dt | canberra_dt | diff |
---|---|---|---|
2022-07-11 22:18:48.4678620 | 2022-07-11 15:18:48.4678620 | 2022-07-12 08:18:48.4678620 | -17:00:00 |
- To convert a datetime from local to UTC, see datetime_local_to_utc()
- Timezones
- List of supported timezones
- format_datetime()