Skip to main content

DateTimeZone.ToText

Επιστρέφει μια αναπαράσταση κειμένου της τιμής datetimezone.

Syntax

DateTimeZone.ToText(
dateTimeZone as datetimezone,
optional options as any,
optional culture as text
) as text

Remarks

Returns a textual representation of dateTimeZone. An optional record parameter, options, may be provided to specify additional properties. culture is only used for legacy workflows. The record can contain the following fields:

  • Format: A text value indicating the format to use. For more details, go to https://go.microsoft.com/fwlink/?linkid=2180104 and https://go.microsoft.com/fwlink/?linkid=2180105. Omitting this field or providing null will result in formatting the date using the default defined by Culture.
  • Culture: When Format is not null, Culture controls some format specifiers. For example, in "en-US" "MMM" is "Jan", "Feb", "Mar", ..., while in "ru-RU" "MMM" is "янв", "фев", "мар", .... When Format is null, Culture controls the default format to use. When Culture is null or omitted, Culture.Current is used.

To support legacy workflows, options and culture may also be text values. This has the same behavior as if options = [Format = options, Culture = culture].

Examples

Example #1

Μετατροπή #datetimezone(2010, 12, 31, 01, 30, 25, 2, 0) σε τιμή text. Το αποτέλεσμα μπορεί να διαφέρει ανάλογα με την τρέχουσα κουλτούρα.

DateTimeZone.ToText(#datetimezone(2010, 12, 31, 01, 30, 25, 2, 0))

Result:

"12/31/2010 1:30:25 AM +02:00"

Example #2

Μετατροπή με χρήση προσαρμοσμένης μορφής και της γερμανικής κουλτούρας.

DateTimeZone.ToText(#datetimezone(2010, 12, 30, 2, 4, 50.36973, -8,0), [Format="dd MMM yyyy HH:mm:ss.ffffff zzz", Culture="de-DE"])

Result:

"30 Dez 2010 02:04:50.369730 -08:00"

Example #3

Μετατροπή με χρήση του μοτίβου ISO 8601.

DateTimeZone.ToText(#datetimezone(2000, 2, 8, 3, 45, 12, 2, 0),[Format="O", Culture="en-US"])

Result:

"2000-02-08T03:45:12.0000000+02:00"

Category

DateTimeZone