@TimeZoneToText (Formula Language)
Converts a canonical time zone value to a human-readable text string.
Syntax
@TimeZoneToText( timeZone ; formatString )
Parameters
timeZone
Canonical time zone value or list thereof. Use a Notes® Time zone field to create a time zone value.
formatString
Optional. String consisting of one or more of the following format specifiers:
Format specifier |
Returns |
---|---|
S |
Short time zone string, for example: "GMT-08:00" |
A |
Alias for local time zone. For example, if the zone is the same as the zone in which the system is running, returns: "Local time" |
Return value
string
The time-date value converted to a string. If you do not include a format specifier, a long time zone label is returned. For example:
"(GMT-08:00) Pacific Time (US & Canada);Tijuana"
Usage
If the first parameter is a list, the function operates on each list element, and the return value is a list with the same number of elements.
This function is useful for displaying the contents of a Time zone field in a view. If you do not use this function, a Time zone field value displays in the view with a format similar to the following:
Z=9$DO=1$DL=4 1 1 10-1 1$ZX=1$ZN=Alaskan
Also use this function with the @GetCurrentTimeZone function to translate the time zone value it returns into a readable string.
Examples
- This code, when added as the Column Value formula for a view,
displays the contents of the Time zone field named Zone as "GMT-07:00"
if the Zone field has the value Z=7$DO=0$ZX=6$ZN=US Mountain (which
is selected in the Time zone field as GMT-07:00 Arizona).
@TimeZoneToText(Zone;"S")
- This code, when added as the Column Value formula for a view and
accessed from a system running in the EST time zone, displays a document
that has (GMT 00:00) Greenwich Mean Time: Dublin, Edinburgh, Lisbon,
London selected in its "Zone" Time zone field as "" and a document
that has (GMT-05:00) Eastern Time (US & Canada) selected in its
Zone field as "Local time."
@TimeZoneToText(Zone;"SA")
- This code, when added as the Column Value formula for a view,
displays the contents of the Time zone fields named Zone1 and Zone2.
@TimeZoneToText(Zone1 : Zone2; "S")