Reads date values in the form yyyymm or yymm.
-
w
-
specifies the width of the input field.
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.
input date1 yymmn6.;
Data Line |
Results |
----+----1----+
|
|
200508
|
16649
|
|
Formats:
|
|
Functions:
|
|
Informats:
|
|
System
Option:
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.