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

Date Formats

Table 3.3 lists the date formats available in SAS software. For each format, an example is shown of a date value in the notation produced by the format. The date '17OCT91'D is used as the example.

Table 3.3: SAS Date Formats

Format   Width Default
     Example Description Range Width
    
DATEw.day, month abbreviation, year:5-97
     17oct91ddMONyy  
    
DAYw.day of month2-322
     17   
    
DDMMYYw.day, month, year: dd/mm/yy2-88
     17/10/91   
    
DOWNAMEw.name of day of the week1-329
     Thursday   
    
JULDAYw.day of year3-323
     290   
    
JULIANw.year and day of year: yyddd5-75
     91290   
    
MMDDYYw.month, day, year: mm/dd/yy2-88
     10/17/91   
    
MMYYw.month and year: mmMyy5-327
     10M1991   
    
MMYYCw.month and year: mm:yy5-327
     10:1991   
    
MMYYDw.month and year: mm-yy5-327
     10-1991   
    
MMYYPw.month and year: mm.yy5-327
     10.1991   
    
MMYYSw.month and year: mm/yy5-327
     10/1991   
    
MMYYNw.month and year: mmyy5-326
     101991   
    
MONNAMEw.name of month1-329
     October   
    
MONTHw.month of year1-322
     10   
    
MONYYw.month abbreviation and year:5-75
     OCT91MONyy  
    
QTRw.quarter of year1-321
     4   
    
QTRRw.quarter in Roman numerals3-323
     IV   
    
NENGOw.Japanese Nengo notation2-1010
     H.03/10/17   
    
WEEKDATEw.day-of-week, month-name dd, yy3-3729
      Thursday, October 17, 1991   
    
WEEKDATXw.day-of-week, dd month-name yy3-3729
      Thursday, 17 October 1991   
    
WEEKDAYw.day of week1-321
     5   
    
WORDDATEw.month-name dd, yy3-3218
      October 17, 1991   
    
WORDDATXw.dd month-name yy3-3218
      17 October 1991   
    
YEARw.year2-324
     1991   
    
YYMMw.year and month: yyMmm5-327
     1991M10   
    
YYMMCw.year and month: yy:mm5-327
     1991:10   
    
YYMMDw.year and month: yy-mm5-327
     1991-10   
    
YYMMPw.year and month: yy.mm5-327
     1991.10   
    
YYMMSw.year and month: yy/mm5-327
     1991/10   
    
YYMMNw.year and month: yymm5-327
     199110   
    
YYMONw.year and month abbreviation:5-327
     1991OCTyyMON  
    
YYMMDDw.year, month, day: yy/mm/dd2-88
     91/10/17   
    
YYQw.year and quarter: yyQq4-64
     91Q4   
    
YYQCw.year and quarter: yy:q4-326
     1991:4   
    
YYQDw.year and quarter: yy-q4-326
     1991-4   
    
YYQPw.year and quarter: yy.q4-326
     1991.4   
    
YYQSw.year and quarter: yy/q4-326
     1991/4   
    
YYQNw.year and quarter: yyq3-325
     19914   
    
YYQRw.year and quarter in Roman6-328
     1991QIVnumerals: yyQrr  
    
YYQRCw.year and quarter in Roman6-328
     1991:IVnumerals: yy:rr  
    
YYQRDw.year and quarter in Roman6-328
     1991-IVnumerals: yy-rr  
    
YYQRPw.year and quarter in Roman6-328
     1991.IVnumerals: yy.rr  
    
YYQRSw.year and quarter in Roman6-328
     1991/IVnumerals: yy/rr  
    
YYQRNw.year and quarter in Roman6-328
     1991IVnumerals: yyrr  
    

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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