DATETIME Function

Returns the current date and time of day as a SAS datetime value.

Category: Date and Time
Returned data type: DOUBLE

Syntax

DATETIME( )

Comparisons

The DATETIME function does not take any arguments. The SAS datetime value returned is the number of seconds from January 1, 1960 to the current date and time.

Example

The following statement illustrates the DATETIME function:
Statements
Results
select datetime();
1801740200.7
select put(datetime(),datetime18.);
03FEB17:11:23:21

See Also

Functions:
Last updated: February 23, 2017