Datetime datetime format the constants run quotes are used create literal value
Chapter 1: Introduction to Dates and Times in SAS3
SAS values, informats describe what the data look like so that SAS can translate it correctly for storage. We will discuss formats and informats in detail in Chapters 2, 3, and 4 because there are dozens of them. Three of the most commonly used formats that work with SAS date, time, and datetime values are used in the following section.
Example 1.1: Date Constants
|
---|
4 The Essential Guide to SAS Dates and Times, Second Edition
ddmonyyyy, followed by a separator (frequently seen as a colon [:]) and then the time (hh:mm:ss).
Unformatted Constants | ||
---|---|---|
date | time | datetime |
|
The second PROC PRINT shows the effect of associating the variable DATE with the WORDDATE. format, the variable TIME with the TIMEAMPM. format, and the variable DATETIME with the DATETIME. format.
Formatted Constants | ||
---|---|---|
date | time | datetime |
August 4, 2013 |
Example 1.2: Incorrect Date Constants
|
---|