Chapter Contents

Previous

Next
DDMMYYw.

DDMMYYw.



Writes date values in the form ddmmyy or ddmmyyyy

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
Tip: When w is from 2 to 5, SAS prints as much of the month and day as possible. When w is 7, the date appears as a two-digit year without slashes, and the value is right aligned in the output field.


Details

The DDMMYYw. format writes SAS date values in the form ddmmyy or ddmmyyyy, where

dd
is an integer that represents the day of the month.

mm
is an integer that represents the month.

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


Examples

The example table uses the input value of 15415, which is the SAS date value that corresponds to March 16, 2002.

SAS Statements Results

----+----1----+
put date ddmmyy5.; 
16/03
put date ddmmyy6.; 
160302
put date ddmmyy7.;
 160302
put date ddmmyy8.; 
16/03/02
put date ddmmyy10.; 
16/03/2002


See Also

Formats:

DATEw.
MMDDYYw.
YYMMDDw.

Function:

MDY

Informats:

DATEw.
DDMMYYw.
MMDDYYw.
YYMMDDw.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.