Chapter Contents

Previous

Next
MMDDYYw.

MMDDYYw.


Writes date values in the form mmddyy or mmddyyyy

Category: Date and Time
Alignment: right


Syntax
Syntax Description
Details
Examples
See Also

Syntax

MMDDYYw.

Syntax Description

w
specifies the width of the output field.
Default: 8
Range: 2-10


Details

The MMDDYYw. format writes SAS date values in the form mmddyy or mmddyyyy, where

mm
is an integer that represents the month.

dd
is an integer that represents the day of the month.

yy or yyyy
is a two- or four-digit integer that represents the year.


Examples

The example table uses the input value of 13769, which is the SAS date value that corresponds to September 12, 1997.

SAS Statements Results


----+----1----+

put day mmddyy2.;

09

put day mmddyy3.; 

 09

put day mmddyy4.; 

0912

put day mmddyy5.;

09/12

put day mmddyy6.; 

091297

put day mmddyy7.;

 091297

put day mmddyy8.; 

09/12/97

put day mmddyy10.; 

09/12/1997


See Also

Formats:

DATEw.
DDMMYYw.
YYMMDDw.

Functions:

DAY
MDY
MONTH
YEAR

Informats:

DATEw.
DDMMYYw.
YYMMDDw.


Chapter Contents

Previous

Next

Top of Page

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.