SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Date and Time Values
Reading Dates and Times Using Informats


MMDDYYw. Informat

You can tell by its name that the informat MMDDYYw. reads date values in the form 10/15/99.


General form,  values read with MMDDYYw. informat:
mmddyy or mmddyyyy

where

  • mm is an integer between 01 and 12, representing the month
  • dd is an integer between 01 and 31, representing the day
  • yy or yyyy is the integer representing the year.


In the MMDDYYw. informat, the month, day, and year fields can be separated by blanks or special characters. If delimiters are used, they must be placed between all fields in the values. Remember to specify a field width that includes not only the month, day, and year values, but any delimiters as well. Here are some date expressions you can read using the MMDDYYw. informat:


Date Expression SAS Date Informat
101599 MMDDYY6.
10/15/99 MMDDYY8.
10 15 99 MMDDYY8.
10-15-1999 MMDDYY10.



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement