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 or yyyy
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.  [cautend]


Examples


input date1 yymmn6.;

Data Lines Results

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


199808

01AUG1998


See Also

Functions:

DAY
MONTH
YEAR
MDY

Informats:

DATEw.
DDMMYYw.
MMDDYYw.
YYMMDDw.

System Option:

YEARCUTOFF=

Formats:

DATEw.
DDMMYYw.
YYMMDDw.
YYMMxw.
YYMONw.


Chapter Contents

Previous

Next

Top of Page

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