Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Date Intervals, Formats, and Functions

Date and Datetime Informats

Table 3.2 summarizes the SAS date and datetime informats available in SAS software. See Chapter 2, "Working with Time Series Data," for a discussion of the use of date and datetime informats. Refer to SAS Language: Reference for a complete description of these informats.

For each informat, Table 3.2 shows an example of a date or datetime value written in the style that the informat is designed to read. The date 17 October 1991 and the time 2:25:32 p.m. are used for the example in all cases. table informats shows the width range allowed by the informat and shows the default width in parenthesis.

Table 3.2: SAS Date and Datetime Informats

Informant   Width Default
     Example Description Range Width
    
DATEw.day, month abbreviation, and year:7-327
     17oct91ddMONyy  
    
DATETIMEw.ddate and time: ddMONyy:hh:mm:ss13-4018
     17oct91:14:45:32   
    
DDMMYYw.day, month, year: ddmmyy, dd/mm/yy,6-326
     17/10/91dd-mm-yy, or dd mm yy  
    
JULIANw.year and day of year (Julian dates): yyddd5-325
     91290   
    
MMDDYYw.month, day, year: mmddyy, mm/dd/yy,6-326
     10/17/91mm-dd-yy, or mm dd yy  
    
MONYYw.month abbreviation and year5-325
     Oct91   
    
NENGOw.Japanese Nengo notation7-3210
     H.03/10/17   
    
TIMEw.dhours, minutes, seconds: hh:mm:ss5-328
     14:45:32or hours, minutes: hh:mm.  
    
YYMMDDw.year, month, day: yymmdd, yy/mm/dd,6-326
     91/10/17yy-mm-dd, or yy mm dd  
    
YYQw.year and quarter of year: yyQq4-324
     91Q4   

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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