DateTimeZone.ToText

Syntax

DateTimeZone.ToText(dateTimeZone as nullable datetimezone, optional format as nullable text, optional culture as nullable text) as nullable text

About

Returns a textual representation of dateTimeZone. An optional format may be provided to customize the formatting of the text. An optional culture may also be provided (for example, "en-US").

Example 1

Get a textual representation of #datetimezone(2011, 12, 31, 11, 56, 2, 8, 0).

DateTimeZone.ToText(#datetimezone(2010, 12, 31, 11, 56, 2, 8, 0))

"12/31/2010 11:56:02 AM +08:00"

Example 2

Get a textual representation of #datetimezone(2010, 12, 31, 11, 56, 2, 10, 12) with format option.

DateTimeZone.ToText(#datetimezone(2010, 12, 31, 11, 56, 2, 10, 12), "yyyy/MM/ddThh:mm:sszzz")

"2010/12/31T11:56:02+10:12"