DDMMYYw. Format

Writes SAS 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.

Arguments

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, where
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 19704, which is the SAS date value that corresponds to December 12, 2013.
Statements
Results
----+----1----+
select put(19704,ddmmyy.); 
12/12/13
select put(19704,ddmmyy5.); 
12/13
select put(19704,ddmmyy6.); 
121213
select put(19704,ddmmyy7.); 
 121213
select put(19704,ddmmyy8.); 
12/12/13
select put(19704,ddmmyy10.); 
12/12/2013
Last updated: February 23, 2017