@TimeToTextInZone (Formula Language)
Converts a time-date value to a text string, incorporating time zone information.
Syntax
@TimeToTextInZone( timeDate ; timeZone ; formatString )
Parameters
timeDate
Time-date value or time-date list. The time-date value or values to be converted.
timeZone
Canonical time zone value. You can derive a time zone value using a Notes® Time zone field.
formatString
Optional. String consisting of one or more of the following format specifiers:
Format specifier |
Definition |
---|---|
D0 |
Year, month, and day |
D1 |
Month and day, year if it is not the current year |
D2 |
Month and day |
D3 |
Month and year |
T0 |
Hour, minute, and second |
T1 |
Hour and minute |
S0 |
Date only |
S1 |
Time only |
S2 |
Date and time |
S3 |
Date, time, Today, or Yesterday |
Sx |
Use when you cannot predict the exact format of the value being passed, but you know that it is either a time, a date, or both. |
You can include up to three specifiers, but only one that begins with D, one that begins with T, and one that begins with S.
Return value
string
The time-date value converted to a string.
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.
Examples
- This code, when used in an action button on a form, applies the
zone information of GMT-00:00 that a user selects from the list in
the "There" Time zone field to the time-date of 02/26/2002 03:19 PM
EST that results from an @Now formula in the "Here" Date/Time field.
The "Time there" message box that appears displays "02/26/2002 08:19:00
PM."
@Prompt([OK];"Time there";@TimeToTextInZone(Here;There))
- This code, when added as a Column Value formula, displays "11:06
AM Today" in the view column if the Here field contains "02/26/2002
03:06 PM EST," the There field contains Z=9$DO=1$DL=4 1 1 10-1 1$ZX=3$ZN=Alaskan
(which displays as GMT -09:00 Alaska), and the current date is 02/26/2002.
@TimeToTextInZone(Here;There;"D2T1S3")