DateTimeZone.SwitchZone

 

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.

Changes the timezone information for the input DateTimeZone.

DateTimeZone(dateTimeZone as datetimezone, timezoneHours as number,  optional timezoneMinutes as nullablenumber ) as nullable datetimezone  

ArgumentDescription
dateTimeZoneThe DateTimeZone to modify.
timezoneHoursThe house to add.
optional timezoneMinutesThe minuts to add.
  • If the input value does not have a timezone component, DateTimeZone.SwitchZone throws Expression.Error.
DateTimeZone.SwitchZone(#datetimezone(2010, 5, 4, 6, 5, 5, 0, 0), 8) equals #datetimezone(2010, 5, 4, 14, 5, 5, 8, 0)  

DateTimeZone.SwitchZone(#datetimezone(2010, 12, 31, 11, 56, 02, 7, 30), 0, -30) equals #datetimezone(2010, 12, 31, 3, 56, 2, 0, -30)  

Show: