MDY Function
Returns a SAS date value from month, day, and year values.
| Categories: | Date and Time |
| CAS |
Syntax
Required Arguments
month
specifies a numeric constant, variable, or expression that represents an integer from 1 through 12.
day
specifies a numeric constant, variable, or expression that represents an integer from 1 through 31.
year
specifies a numeric constant, variable, or expression with a value of a two-digit or four-digit integer that represents the year. The YEARCUTOFF= system option defines the year value for two-digit dates.
Example
|
SAS Statement
|
Result
|
|---|---|
birthday=mdy(8, 27, 90); put birthday; put birthday= worddate.; |
11196 birthday=August 27, 1990 |
anniversary=mdy(7, 11, 2001); put anniversary; put anniversary=date9.; |
15167 anniversary=11JUL2001 |