Previous Page | Next Page

Formats

MMDDYYw. Format



Writes date values in the form mmdd<yy>yy or mm/dd/<yy>yy, where a forward slash is the separator and the year appears as either 2 or 4 digits.
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
Interaction: When w has a value of from 2 to 5, the date appears with as much of the month and the day as possible. When w is 7, the date appears as a two-digit year without slashes.

Details

The MMDDYYw. format writes SAS date values in the form mmdd<yy>yy or mm/dd/<yy>yy, where

mm

is an integer that represents the month.

/

is the separator.

dd

is an integer that represents the day of the month.

<yy>yy

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


Examples

The following examples use the input value of 16734, which is the SAS date value that corresponds to October 25, 2005.

SAS Statement Results
 
----+----1----+
put day mmddyy2.;
10
put day mmddyy3.; 
 10
put day mmddyy4.; 
1025
put day mmddyy5.;
10/25
put day mmddyy6.; 
102505
put day mmddyy7.;
 102505
put day mmddyy8.; 
10/25/05
put day mmddyy10.; 
10/25/2005


See Also

Formats:

DATEw. Format

DDMMYYw. Format

MMDDYYxw. Format

YYMMDDw. Format

Functions:

DAY Function

MDY Function

MONTH Function

YEAR Function

Informats:

DATEw. Informat

DDMMYYw. Informat

YYMMDDw. Informat

Previous Page | Next Page | Top of Page