
126 Handbook of SAS
®
DATA Step Programming
Dates and times are stored as numbers in SAS, so you need to use a format
to see what the numbers represent. For example, DATEw. writes date values
in the form of ddmmmyy, ddmmmyyyy, or dd-mmm-yyyy, where dd is an inte-
ger that represents the day of the month, mmm is the rst three letters of the
month, and yy or yyyy is a two-digit or four-digit integer that represents the
year. The w value represents the width of the output eld.
Another commonly used date format is the MMDDYYw. format that writes
date values in the form of mmdd<yy>yy or mm/dd/<yy>yy, where mm is an
integer value that represents mon ...