MDY Function


Returns a SAS date value from month, day, and year values

Category: Date and Time

Syntax

MDY ( month,day,year )

Arguments

month

  • specifies a numeric expression that represents an integer from 1 through 12.

day

  • specifies a numeric expression that represents an integer from 1 through 31.

year

  • specifies 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;

11196

put birthday= worddate.;

birthday=August 27, 1990

anniversary=mdy(7,11,2001);

 

put anniversary;

15167

put anniversary=date9.;

anniversary=11JUL2001

See Also

Functions:

  • 'DAY Function' on page 483

  • 'MONTH Function' on page 655

  • 'YEAR Function' on page 914




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net