Chapter Contents

Previous

Next
YYMMDDw.

YYMMDDw.


Writes date values in the form yymmdd or yyyymmdd

Category: Date and Time
Alignment: right


Syntax
Syntax Description
Details
Examples
See Also

Syntax

YYMMDDw.

Syntax Description

w
specifies the width of the output field.
Default: 8
Range: 2-10


Details

The YYMMDDw. format writes SAS date values in the form yymmdd or yyyymmdd, where

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

mm
is an integer that represents the month.

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


Examples

The example table uses the input value of 13769, which is the SAS date value that corresponds to September 12, 1997.

SAS Statements Results


----+----1----+

put day yymmdd2.;

97

put day yymmdd3.; 

 97

put day yymmdd4.; 

9709

put day yymmdd5.;

97-09

put day yymmdd6.; 

970912

put day yymmdd7.;

 970912

put day yymmdd8.; 

97-09-12

put day yymmdd10.; 

1997-09-12


See Also

Formats:

DATEw.
DDMMYYw.
MMDDYYw.

Functions:

DAY
MDY
MONTH
YEAR

Informats:

DATEw.
DDMMYYw.
MMDDYYw.


Chapter Contents

Previous

Next

Top of Page

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