PreviousNextIndex

DATETIME-TZ function

Converts a date, time, and time zone value, or a character string, into a DATETIME-TZ value.

Note: If any argument is the Unknown value (?), the result is the Unknown value (?).
Syntax

DATETIME-TZ (date-exp [, mtime-exp [, timezone-exp ] ] ) 

DATETIME-TZ (datetime-exp [, timezone-exp ] )  

DATETIME-TZ (datetime-tz-exp [, timezone-exp ] )  

DATETIME-TZ (month, day, year, hours, minutes [, seconds [, milliseconds  
  [, timezone-exp ] ] ] ) 

DATETIME-TZ ( string ) 

date-exp
mtime-exp
timezone-exp
datetime-exp
datetime-tz-exp
month
day
year
hours
minutes
seconds
milliseconds
string
Example

Following is an example of using the DATETIME-TZ function:

DEFINE VARIABLE my-datetime-tz AS DATETIME-TZ NO-UNDO. 
/* This statement is equivalent to "my-datetime-tz = NOW". */ 
my-datetime-tz = DATETIME-TZ(TODAY, MTIME, TIMEZONE). 

The following statements result in the same DATETIME-TZ value (when SESSION:DATE-FORMAT is mdy):

my-datetime-tz = DATETIME-TZ(5, 5, 2002, 7, 15, 3, 0, -300). 
my-datetime-tz = DATETIME-TZ(“05-05-2002 07:15:03-05:00”). 

See also

ADD-INTERVAL function, DATE function, DATE-FORMAT attribute, DATETIME function, DAY function, ETIME function, INTERVAL function, ISO-DATE function, MONTH function, MTIME function, NOW function, TIME function, TIMEZONE function, TODAY function, WEEKDAY function, YEAR function, YEAR-OFFSET attribute


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex