DateTimeZone.ToTextDateTimeZone.ToText
構文Syntax
DateTimeZone.ToText(dateTimeZone as nullable datetimezone, optional format as nullable text, optional culture as nullable text) as nullable text
バージョン情報About
dateTimeZone
のテキスト表現を返します。Returns a textual representation of dateTimeZone
. テキストの書式設定をカスタマイズするために、オプションの format
を指定できます。An optional format
may be provided to customize the formatting of the text. オプションの culture
を指定することもできます (例: "en-US")。An optional culture
may also be provided (for example, "en-US").
例 1Example 1
#datetimezone(2011, 12, 31, 11, 56, 2, 8, 0) のテキスト形式の表記を取得します。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"
例 2Example 2
形式オプションを使用して、#datetimezone(2010, 12, 31, 11, 56, 2, 10, 12) のテキスト形式の表記を取得します。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"