Skip to main content

DateTime.AddZone

Adds timezone information to the datetime value.

Syntax

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

Remarks

Adds timezone information to the dateTime value. The timezone information includes timezoneHours and optionally timezoneMinutes, which specify the desired offset from UTC time.

Examples

Example #1

Set the timezone to UTC+7:30 (7 hours and 30 minutes past UTC).

DateTime.AddZone(#datetime(2010, 12, 31, 11, 56, 02), 7, 30)

Result:

#datetimezone(2010, 12, 31, 11, 56, 2, 7, 30)

Category

DateTime