DDMMYYw. Format

Writes date values in the form ddmm<yy>yy or dd/mm/<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

DDMMYYw.

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 day and the month as possible. When w is 7, the date appears as a two-digit year without slashes.

Details

The DDMMYYw. format writes SAS date values in the form ddmm<yy>yy or dd/mm/<yy>yy:
dd
is an integer that represents the day of the month.
/
is the separator.
mm
is an integer that represents the month.
<yy>yy
is a two-digit or four-digit integer that represents the year.

Example

The following examples use the input value of 19351, which is the SAS date value that corresponds to December 24, 2012.
SAS Statement
Result
----+----1
put date ddmmyy5.; 
24/12
put date ddmmyy6.; 
241212
put date ddmmyy7.;
 241212
put date ddmmyy8.; 
24/12/12
put date ddmmyy10.; 
24/12/2012

See Also

Functions:
MDY Function in SAS Functions and CALL Routines: Reference