DateTimeZone.From

Last updated 5 months ago

DateTimeZone.From

Creates a datetimezone from the given value.

function (optional value as nullable any, optional culture as nullable any) as nullable any

Description

Returns a datetimezone value from the given value. If the given value is null, DateTimeZone.From returns null. If the given value is datetimezone, value is returned. Values of the following types can be converted to a datetimezone value:

If value is of any other type, an error is returned.

Category

DateTimeZone

Examples

Convert "2020-10-30T01:30:00-08:00" to a datetimezone value.

DateTimeZone.From("2020-10-30T01:30:00-08:00")

datetimezone(2020, 10, 30, 01, 30, 00, -8, 00)