DateTimeZone.FromText

Last updated 5 months ago

DateTimeZone.FromText

Creates a datetimezone from local and universal datetime formats.

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

Description

Creates a datetimezone value from a textual representation, text, following ISO 8601 format standard.

Category

DateTimeZone

Examples

Convert "2010-12-31T01:30:00-08:00" into a datetimezone value.

DateTimeZone.FromText("2010-12-31T01:30:00-08:00")

datetimezone(2010, 12, 31, 1, 30, 0, -8, 0)

Convert "2010-12-31T01:30:00.121212-08:00" into a datetimezone value.

DateTimeZone.FromText("2010-12-31T01:30:00.121212-08:00")

datetimezone(2010, 12, 31, 1, 30, 0.121212, -8, 0)

Convert "2010-12-31T01:30:00Z" into a datetimezone value.

DateTimeZone.FromText("2010-12-31T01:30:00Z")

datetimezone(2010, 12, 31, 1, 30, 0, 0, 0)

Convert "20101231T013000+0800" into a datetimezone value.

DateTimeZone.FromText("20101231T013000+0800")

datetimezone(2010, 12, 31, 1, 30, 0, 8, 0)