Previous Page | Next Page

Formats

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
Syntax Description
Details
Examples
See Also

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, 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.


Examples

The following examples use the input value of 16794, which is the SAS date value that corresponds to December 24, 2005.

SAS Statement Results

----+----1----+
put date ddmmyy5.; 
24/12
put date ddmmyy6.; 
241205
put date ddmmyy7.;
 241205
put date ddmmyy8.; 
24/12/05
put date ddmmyy10.; 
24/12/2005


See Also

Formats:

DATEw. Format

DDMMYYxw. Format

MMDDYYw. Format

YYMMDDw. Format

Function:

MDY Function

Informats:

DATEw. Informat

DDMMYYw. Informat

MMDDYYw. Informat

YYMMDDw. Informat

Previous Page | Next Page | Top of Page