Chapter Contents
Chapter Contents
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, month abbreviation, year:5-97
     17oct91ddMONyy of month2-322
     17, month, year: dd/mm/yy2-88
     17/10/91 of day of the week1-329
     Thursday of year3-323
JULIANw.year and day of year: yyddd5-75
MMDDYYw.month, day, year: mm/dd/yy2-88
MMYYw.month and year: mmMyy5-327
MMYYCw.month and year: mm:yy5-327
MMYYDw.month and year: mm-yy5-327
MMYYPw.month and year: mm.yy5-327
MMYYSw.month and year: mm/yy5-327
MMYYNw.month and year: mmyy5-326
     101991 of month1-329
MONTHw.month of year1-322
MONYYw.month abbreviation and year:5-75
QTRw.quarter of year1-321
QTRRw.quarter in Roman numerals3-323
NENGOw.Japanese Nengo notation2-1010
     H.03/10/17, month-name dd, yy3-3729
      Thursday, October 17, 1991, dd month-name yy3-3729
      Thursday, 17 October 1991 of week1-321
WORDDATEw.month-name dd, yy3-3218
      October 17, 1991   
WORDDATXw.dd month-name yy3-3218
      17 October 1991   
YYMMw.year and month: yyMmm5-327
YYMMCw.year and month: yy:mm5-327
YYMMDw.year and month: yy-mm5-327
YYMMPw.year and month: yy.mm5-327
YYMMSw.year and month: yy/mm5-327
YYMMNw.year and month: yymm5-327
YYMONw.year and month abbreviation:5-327
YYMMDDw.year, month, day: yy/mm/dd2-88
YYQw.year and quarter: yyQq4-64
YYQCw.year and quarter: yy:q4-326
YYQDw.year and quarter: yy-q4-326
YYQPw.year and quarter: yy.q4-326
YYQSw.year and quarter: yy/q4-326
YYQNw.year and quarter: yyq3-325
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

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