Introduction to Working with Dates

Purpose

SAS stores dates as single, unique numbers so that they can be used in programs like any other numeric variable. In this section, you will learn how to do the following:
  • make SAS read dates in raw data files and store them as SAS date values
  • indicate which calendar form SAS should use to display SAS date values
  • calculate with dates, that is, determine the number of days between dates, find the day of the week on which a date falls, and use today's date in calculations

Prerequisites

You should understand the following topics before proceeding with this section:

Get Step-by-Step Programming with Base SAS 9.4 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.