DateTimeZone.ToLocal
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a DateTime value from the local time zone.
DateTimeZone.ToLocal(dateTime as datetimezone) as nullable datetimezone
| Argument | Description |
|---|---|
| dateTime | The DateTimeZone to convert. |
//assuming local as PST
dateTime = DateTimeZone.FromText("2011-02-20T22:19:27+03:00")
localTime=DateTimeZone.ToLocal(dateTime) equals 2011-02-20T11:19:27-08:00
Show: