Chapter Contents

Previous

Next
YYMMDDw.

YYMMDDw.



Reads date values in the form yymmdd or yyyymmdd

Category: Date and Time


Syntax
Syntax Description
Details
Examples
See Also

Syntax

YYMMDDw.

Syntax Description

w
specifies the width of the input field.
Default: 6
Range: 6-32


Details

The date values must be in the form yymmdd or yyyymmdd, where

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

mmm
is the first three letters of the month name.

dd
is an integer from 01 through 31 that represents the day of the month.

You can separate the year, month, and day values by blanks or by special characters. However, if delimiters are used, place them between all the values. You can also place blanks before and after the date. Make sure the width of the input field allows space for blanks and special characters.

Note:   SAS interprets a two-digit year as belonging to the 100-year span that is defined by the YEARCUTOFF= system option.  [cautionend]


Examples

input calendar_date yymmdd10.;

Data Lines Results
----+----1----+

020316
15415
02/03/16
15415
02 03 16
15415
2002-03-16
15415


See Also

Formats:

DATEw.
DDMMYYw.
MMDDYYw.
YYMMDDw.

Functions:

DAY
MDY
MONTH
YEAR

Informats:

DATEw.
DDMMYYw.
MMDDYYw.

System Option:

YEARCUTOFF=


Chapter Contents

Previous

Next

Top of Page

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