DATEPART Function

Extracts the date from a SAS datetime value.

Category: Date and Time

Syntax

DATEPART(datetime)

Required Argument

datetime

specifies a SAS expression that represents a SAS datetime value.

Example

The following SAS statements produce this result:
SAS Statement
Result
conn='01feb94:8:45'dt;
servdate=datepart(conn);
put servdate worddate.;
 
February 1, 1994

See Also