Previous Page | Next Page

Functions and CALL Routines

MDY Function



Returns a SAS date value from month, day, and year values.
Category: Date and Time

Syntax
Arguments
Examples
See Also

Syntax

MDY(month,day,year)


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.


Examples

SAS Statements Results
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


See Also

Functions:

DAY Function

MONTH Function

YEAR Function

Previous Page | Next Page | Top of Page