DDMMYYxw. Format

Writes SAS date values in the form ddmm[yy]yy or ddXmmX[yy]yy, where X represents a specified separator and the year appears as either 2 or 4 digits.

Category: Date and Time
Alignment: Right

Syntax

DDMMYYxw.

Arguments

x

identifies a separator or specifies that no separator appear between the day, the month, and the year. Valid values for x are any of the following:

B

separates with a blank

C

separates with a colon

D

separates with a hyphen

N

indicates no separator

P

separates with a period

S

separates with a slash.

w

specifies the width of the output field.

Default 8
Range 2–10
Interactions 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 separators.
When x has a value of N, the width range changes to 2–8.

Details

The DDMMYYxw. format writes SAS date values in the form ddmm[yy]yy or ddXmmX[yy]yy, where
dd
is an integer that represents the day of the month.
X
is a specified 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 19431, which is the SAS date value that corresponds to March 14, 2013.
Statements
Results
----+----1----+
select put(19431,ddmmyyc5.);
14:03
select put(19431,ddmmyyd8.);
14-03-13
select put(19431,ddmmyyn8.);
14032013
select put(19431,ddmmyyp10.);
14.03.2013
Last updated: February 23, 2017