PreviousNextIndex

DATETIME function

Converts date and time values, or a character string, into a DATETIME value.

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

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

DATETIME ( string ) 

DATETIME (month, day, year, hours, minutes [, seconds [, milliseconds ] ] ) 

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

Following is an example of using the DATETIME function:

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

The following statements result in the same DATETIME value:

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

See also

ADD-INTERVAL function, DATE function, DATE-FORMAT attribute, DATETIME-TZ 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