Appendix A: A Quick Reference Guide to SAS Date, Time, and Datetime Formats

This table shows the result when the same date, time, or datetime value is displayed with the corresponding format, using the default length for the given format.

The reference date for this table is Thursday, September 18, 2014.

If You Want Your Dateto Look Like This Use This Format
18SEP14 DATE.
18 DAY.
18/09/14 DDMMYY.
18 09 14 DDMMYYB.
18:09:14 DDMMYYC.
18-09-14 DDMMYYD.
18092014 DDMMYYN.
18.09.14 DDMMYYP.
18/09/14 DDMMYYS.
Thursday DOWNAME.
261 JULDAY.
14261 JULIAN.
09/18/14 MMDDYY.
09 18 14 MMDDYYB.
09:18:14 MMDDYYC.
09-18-14 MMDDYYD.
09182014 MMDDYYN.
09.18.14 MMDDYYP.
09/18/14 MMDDYYS.
09M2014 MMYY.
09:2014 MMYYC.

Get The Essential Guide to SAS Dates and Times, Second Edition, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.