Previous Page | Next Page

Informats

YYMMNw. Informat



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-digit 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 Line Results
----+----1----+

200508
16649


See Also

Formats:

DATEw. Format

DDMMYYw. Format

YYMMDDw. Format

YYMMw. Format

YYMONw. Format

Functions:

DAY Function

MONTH Function

MDY Function

YEAR Function

Informats:

DATEw. Informat

DDMMYYw. Informat

MMDDYYw. Informat

YYMMDDw. Informat

System Option:

YEARCUTOFF= System Option

Previous Page | Next Page | Top of Page