Chapter Contents

Previous

Next
MMDDYYw.

MMDDYYw.



Reads date values in the form mmddyy or mmddyyyy

Category: Date and Time


Syntax
Syntax Description
Details
Examples
See Also

Syntax

MMDDYYw.

Syntax Description

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


Details

The date values must be in the form mmddyy or mmddyyyy, where

mm
is an integer from 01 through 12 that represents the month.

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

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

You can separate the month, day, and year fields by blanks or by special characters. However, if you use delimiters, place them between all fields in the value. Blanks can also be placed before and after the date.

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 mmddyy8.;

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

031699
14319
03/16/99
14319
03 16 99
14319


See Also

Formats:
DATEw.
DDMMYYw.
MMDDYYw.
YYMMDDw.
Functions:
DAY
MDY
MONTH
YEAR
Informats:
DATEw.
DDMMYYw.
YYMMDDw.
System Option:
YEARCUTOFF=


Chapter Contents

Previous

Next

Top of Page

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