DateTime.AddZone Function in Power Query
The DateTime.AddZone function in Power Query is used to add timezone information to a datetime value, converting it into a datetimezone type. This is particularly helpful when working with dates and times that need explicit timezone context, such as when dealing with data from different regions or systems that don’t inherently include timezone details.
Syntax
DateTime.AddZone( dateTime as nullable datetime, timezoneHours as number, optional timezoneMinutes as nullable number ) as nullable datetimezone
Example: Let’s add the timezone component to the datetime value.
Power Query M
let Source = DateTime.AddZone(#datetime(2025,4,7,12,48,40), 5,30) in Source
The output of the above code is 07-04-2025 12:48:40 +05:30. Here, we set the timezone to +5:30 ahead of UTC.