YEAR Function
Returns the year from a SAS date value.
| Categories: | Date and Time |
| CAS |
Syntax
YEAR(date)
Required Argument
date
specifies a SAS expression that represents a SAS date value.
Details
The YEAR function produces
a four-digit numeric value that represents the year.
Example
The following SAS statements
produce this result:
|
SAS Statement
|
Result
|
|---|---|
date='25dec97'd; y=year(date); put y; |
1997 |
See Also
Copyright © SAS Institute Inc. All Rights Reserved.
Last updated: March 16, 2017