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 15595, which is the SAS date value that corresponds to September 12, 2002.

SAS Statements Results

----+----1----+
put day yymmdd2.;
02
put day yymmdd3.; 
 02
put day yymmdd4.; 
0209
put day yymmdd5.;
02-09
put day yymmdd6.; 
020912
put day yymmdd7.;
 020912
put day yymmdd8.; 
02-09-12
put day yymmdd10.; 
2002-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.