logo Getting Started with SAS Main menuGlossaryBackNext


SAS stores dates and times as single, unique numbers so that you can use them in programs like any other numeric variable:

  • A SAS date value is a value that represents the number of days between January 1, 1960, and a specified date. SAS can perform calculations on dates ranging from A.D. 1582 to A.D. 19,900. Dates before January 1, 1960, are negative numbers; dates after are positive numbers.

    SAS date value
  • A SAS time value is a value representing the number of seconds since midnight of the current day. SAS time values are between 0 and 86400.

    SAS time value

  • A SAS datetime value is a value representing the number of seconds between January 1, 1960 and an hour/minute/second within a specified date.

    SAS datetime value

To work with SAS date, time, and datetime values, you can use these tools:

  • Informats read a value, such as a clock time or a calendar date, which may be of various lengths, and then convert the data to a SAS date, time, or datetime value.

  • Formats present a value recognized by SAS, such as a time or date value, as a calendar date or clock time of various lengths.

  • Functions perform operations on SAS date, time, and datetime values.

Main menuGlossaryBackNext