Date Expression
|
SAS Date Informat
|
---|---|
10/15/17
|
MMDDYYw.
|
15Oct17
|
DATEw.
|
15–10–17
|
DDMMYYw.
|
17/10/15
|
YYMMDDw.
|
Syntax, values read
with MMDDYYw. informat:
mmddyy or mmddyyyy
|
Date Expression
|
SAS Date Informat
|
---|---|
101517
|
MMDDYY6. |
10/15/17
|
MMDDYY8. |
10 15 17
|
MMDDYY8. |
10-15-2017
|
MMDDYY10. |
proc import datafile='C:UsersStudent1cert ew_hires.csv' out=newhires dbms=csv replace; getnames=yes; run; proc print data=work.newhires; run; proc contents data=work.newhires; run;
Syntax, values read
with DATEw. informat:
ddmmmyy or ddmmmyyyy
|
Date Expression
|
SAS Date Informat
|
---|---|
30May17
|
DATE7.
|
30May2017
|
DATE9.
|
30-May-2017
|
DATE11.
|
Syntax, values read
with TIMEw. informat:
hh:mm:ss.ss
|
Time Expression
|
SAS Time Informat
|
---|---|
17:00:01.34
|
TIME11.
|
17:00
|
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
|
---|---|
30May2017:10:03:17.2
|
DATETIME20.
|
30May17 10:03:17.2
|
DATETIME18.
|
30May2017/10:03
|
DATETIME15.
|