Previous Next

TIMEZONE function
Returns an INTEGER value representing the time zone offset from Coordinated Universal Time (UTC), in minutes. Use this function together with the STRING function to produce the time in hours, minutes, and seconds.
Note:
Syntax 
 
TIMEZONE ( [ datetime-tz-expression | char-expression ] )
datetime-tz-expression
An expression whose value is a DATETIME-TZ.
char-expression
A character expression representing the time zone offset. The format of the expression must be +HH:MM.
If the TIMEZONE function has no arguments, it returns the client or server machine that serves as the time source for applications running during the ABL session (specified by the TIME-SOURCE attribute).
Example 
Following is an example of using the TIMEZONE function:
 
DEFINE VARIABLE v-dt-tz AS DATETIME-TZ NO-UNDO
  INITIAL 2002-05-05T07:15:03.002-05:00.
DEFINE VARIABLE v-tz    AS INTEGER     NO-UNDO.
 
ASSIGN
  v-tz = TIMEZONE(“+08:00”)  /* v-tz = 480 */
  v-tz = TIMEZONE (v-dt-tz). /* v-tz = -300 */
See also 
ADD-INTERVAL function, DATE function, DATE-FORMAT attribute, DATETIME function, DATETIME-TZ function, DAY function, ETIME function, INTERVAL function, ISO-DATE function, MONTH function, MTIME function, NOW function, TIME function, TIME-SOURCE attribute, TODAY function, WEEKDAY function, YEAR function, YEAR-OFFSET attribute

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.