Wednesday Half-Day Class Derek Morgan

Everything You Wanted to Know About Dates and Times in SAS

Presented: Wednesday September 5, 2018, 8:00am-11:30am

Presented by:
Derek Morgan is a principal statistical programmer at PAREXEL International. He has been a SAS user for over 30 years and is author of the SAS Press Book, The Essential Guide to SAS Dates and Times. In his spare time, Derek plays bass guitar, and has performed with three members of the Rock and Roll Hall of Fame.

Description:
This class will provide a deeper dive into some of the more powerful, yet lesser-known features of SAS date and time handling. Some of the topics to be covered in-depth are:

  • Using picture formats with date, time, and datetime values
  • SAS and the ISO8601 standard (it’s not just for CDISC)
  • SAS date and time functions
  • Intervals, multipliers, shifts, and create-your-own intervals
  • Graphing with dates

Intended Audience: Beginner to intermediate

Tools Discussed: Base SAS

Prerequisite: None

Class Outline:

  • The basics, SAS data/time/datetime values, displaying and reading SAS datetime values
  • Creating custom PICTURE formats using date directives
  • The ISO8601 standard and SAS
    • ISO8601: what is it?
    • Formats and informats designed to work with SAS date/time/datetime values
    • Time zones
    • The difference between SAS date/time/datetime values and their ISO counterparts
    • CALL IS_8601 routine, and maintaining ISO8601 values in SAS datasets
  • Date and time functions
    • Calculating ages
    • NWKDOM() and HOLIDAY()
  • Intervals
    • When to use
    • How to use
    • Moving starting points of intervals, creating intervals that are multipliers of existing intervals
    • INTCK: DISCRETE vs. CONTINUOUS
    • INTNX: How alignment works and how to use it to your advantage
    • The how and why of custom intervals
  • Graphing with dates/times/datetimes
    • With SGPLOT
    • With SAS/GRAPH
  • Dates and times in multiple languages