Date Expression
|
SAS Date Informat
|
---|---|
10/15/09
|
MMDDYYw.
|
15Oct09
|
DATEw.
|
10-15-09
|
MMDDYYw.
|
09/10/15
|
YYMMDDw.
|
Syntax, INPUT statement
with an informat:
INPUT <pointer-control> variable
informat.;
|
input @15 Style $3. @21 Price 5;
Syntax, values read
with MMDDYYw. informat:
mmddyy or mmddyyyy
|
Date Expression
|
SAS Date Informat
|
---|---|
101509
|
MMDDYY6. |
10/15/09
|
MMDDYY8. |
10 15 09
|
MMDDYY8. |
10-15-2009
|
MMDDYY10. |
Syntax, values read
with DATEw. informat:
ddmmmyy or ddmmmyyyy
|
Date Expression
|
SAS Date Informat
|
---|---|
30May10
|
DATE7.
|
30May2010
|
DATE9.
|
30-May-2010
|
DATE11.
|
Syntax, values read
with TIMEw. informat:
hh:mm:ss.ss
|
Time Expression
|
SAS Time Informat
|
---|---|
17:00:01.34
|
TIME11.
|
17:00
|
TIME5.
|
2:34
|
TIME5.
|
5
, you will receive an error
message in the SAS log.
Syntax, values read
with DATETIMEw. informat:
ddmmmyy hh:mm:ss.ss
|
Date and Time Expression
|
SAS Datetime Informat
|
---|---|
30May2010:10:03:17.2
|
DATETIME20.
|
30May10 10:03:17.2
|
DATETIME18.
|
30May2010/10:03
|
DATETIME15.
|
Date Expression
|
SAS Date Informat
|
Result
|
---|---|---|
06Oct09
|
date7.
|
06Oct2009
|
17Mar2013
|
date9.
|
17Mar2013
|
Date Expression
|
SAS Date Informat
|
Result
|
---|---|---|
17Mar1783
|
date7.
|
17Mar2017
|