OpenBI Docs Buy

DateTimeZone.ZoneHours

The hours of a datetimezone's offset from UTC.

Group: Dates and times. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

DateTimeZone.ZoneHours(dateTimeZone as nullable datetimezone) as nullable number
ParameterTypeDescription
dateTimeZonenullable datetimezoneThe value; null gives null.

Returns

nullable number. The whole hours of the offset, negative west of UTC.

Remarks

Examples

An order from New York

DateTimeZone.ZoneHours(#datetimezone(2024, 3, 15, 9, 0, 0, -5, 0))
-5

An offset with minutes

DateTimeZone.ZoneHours(#datetimezone(2024, 3, 15, 9, 0, 0, 5, 30))
5

DateTimeZone.ZoneMinutes, DateTimeZone.SwitchZone, DateTime.AddZone.

Last updated · OpenBI Studio 0.3.79