Caché MultiValue Basic Reference
DATE
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

Returns the current local system date in internal format.
Synopsis
DATE()
Arguments
None. The parentheses are mandatory.
Description
The DATE function returns the current date in a format such as the following:
14122
This represents the elapsed number of days since December 31, 1967. DATE returns the current date at the moment when the function is executed.
Caché MultiValue determines local time (and date) as follows:
Caché MVBasic also supplies @DATE, @DAY, @MONTH, @YEAR, and @YEAR4 system variables. These values are set when the process is initialized, and are only updated when a program is initiated from the MV shell. For further details, see the Variables page of this manual.
Examples
The following example calls the DATE function to return the current date in internal format, then uses the OCONV function to convert date from internal format to display format.
PRINT DATE()
PRINT OCONV(DATE(),"D")
See Also