Chapter Contents

Previous

Next
YYMMNw.

YYMMNw.



Reads date values in the form yyyymm or yymm

Category: Date and Time


Syntax
Syntax Description
Details
Examples
See Also

Syntax

YYMMNw.

Syntax Description

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


Details

The date values must be in the form yyyymm or yymm, where

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

mm
is a two-digit integer that represents the month.

The N in the informat name must be used and indicates that you cannot separate the year and month values by blanks or by special characters. SAS automatically adds a day value of 01 to the value to make a valid SAS date variable.

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 date1 yymmn6.;

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

200208
01AUG2002


See Also

Formats:

DATEw.
DDMMYYw.
YYMMDDw.
YYMMxw.
YYMONw.

Functions:

DAY
MONTH
MDY
YEAR

Informats:

DATEw.
DDMMYYw.
MMDDYYw.
YYMMDDw.

System Option:

YEARCUTOFF=


Chapter Contents

Previous

Next

Top of Page

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