DATEPART Function
Extracts the date from a SAS datetime value.
| Categories: | Date and Time |
| CAS |
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='01feb17:8:45'dt; servdate=datepart(conn); put servdate worddate.; |
February 1, 2017 |
See Also
Copyright © SAS Institute Inc. All Rights Reserved.
Last updated: March 16, 2017