Why does SAS use January 1, 1960, as its arbitrary reference date? How do you convert a value such as 27 January 2003 into a SAS date? How do you put a date into a filename, or label an Excel worksheet with the date?
You'll find the answers to these questions and much more in Derek Morgan's The Essential Guide to SAS Dates and Times, Second Edition, which makes it easy to understand how to use and manipulate dates, times, and datetimes in SAS. Updated for SAS 9.4, with additional functions, formats, and capabilities, the Second Edition has a new chapter dedicated to the ISO 8601 standard and the formats and functions that are new to SAS, including how SAS works with Universal Coordinated Time (UTC).
Novice users will appreciate the new “Troubleshooting” appendix, which discusses questions common to newer SAS users in a conversational way and provides clear examples of simple solutions to these questions. Both novice and intermediate users will find the clear, task-based examples on how to accomplish date-related tasks and the detailed explanations of standard formats and functions invaluable. Users working with intervals will appreciate the expanded discussion of the topic, which details the new custom interval capability, among other enhancements to intervals.
Users working with international dates and times will benefit from the detailed discussion of the NLS facility as it relates to dates and times. Included are bonus "Quick Reference Guides" that list both the standard date and time formats and the NLS date and time formats with examples. These guides illustrate how each format displays the same date, time, or datetime, so you can find the format you want to use at a glance.
The Essential Guide to SAS Dates and Times, Second Edition is the most complete and up-to-date collection of examples on how to write complex programs involving dates, times, or datetime values.
This book is part of the SAS Press Program.
Table of Contents
Chapter 1: Introduction to Dates and Times in SAS
Chapter 2: Displaying SAS Date, Time, and Datetime Values as Dates and Times as We Know Them
Chapter 3: Converting Dates and Times into SAS Date, Time, and Datetime Values
Chapter 4: ISO 8601 Dates, Times, Datetimes, Durations, and Functions
Chapter 5: Date and Time Functions
Chapter 6 Deeper into Dates and Times with SAS
Appendix A: A Quick Reference Guide to SAS Date, Time, and Datetime Formats
Appendix B: A Quick Reference Guide to NLS Date, Time, and Datetime Formats
Appendix C: Troubleshooting Dates 101