Writes date values in the form ddmmmyy or
ddmmmyyyy
| Category: |
Date and Time
|
| Alignment: |
right
|
-
w
-
specifies the width of the output field.
| Default: |
7 |
| Range: |
5-9 |
| Tip: |
Use a width of 9 to print a 4-digit
year. |
The DATEw.
format writes SAS date values in the form ddmmmyy
or ddmmmyyyy, where
-
dd
-
is an integer that represents the day of
the month.
-
mmm
-
is the first three letters of the month
name.
-
yy or yyyy
-
is a two-digit or four-digit integer that
represents the year.
The example table uses the input value of 15780, which
is the SAS date value that corresponds to March 16, 2003.
|
When the SAS Statement is ... |
The Result is ... |
|
----+----1----+
|
put day date5.;
|
16MAR
|
put day date6.;
|
16MAR
|
put day date7.;
|
16MAR03
|
put day date8.;
|
16MAR03
|
put day date9.;
|
16MAR2003
|
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.