DateTime.AddZone

Includes timezone details to the given dateTime value. The timezone information consists of timezoneHours along with a possible addition of timezoneMinutes, indicating the preferred deviation from UTC...

Syntax

DateTime.AddZone(dateTime as nullable datetime, timezoneHours as number, optional timezoneMinutes as nullable number) as nullable datetimezone

About

Includes timezone details to the given dateTime value. The timezone information consists of timezoneHours along with a possible addition of timezoneMinutes, indicating the preferred deviation from UTC time.

Explanation

Adjust the timezone setting to UTC+7:30, which represents a time that is 7 hours and 30 minutes ahead of Coordinated Universal Time (UTC). In the Power Query M language, the function MDateTime.AddZone(#datetime(2010, 12, 31, 11, 56, 02), 7, 30) is used to apply this timezone offset. The output of this function will be #datetimezone(2010, 12, 31, 11, 56, 2, 7, 30).