Hello,
Do you know if it exists a DATETIME format such like YYYY-MM-DDThh:mm:ss (note the 'T' between time and date),
and if not how to create this format with functions.
Thank you,
Regards,
Hugo_B.
There is (see Maxim 8 🙂 ).
It is E8601DT19.
29 data _null_; 30 now = datetime(); 31 format now e8601dt19.; 32 put now=; 33 run; now=2019-05-20T11:03:22
proc format;
picture dtpic
other='%Y-%0m-%0dT%0H:%0M:%0S' (datatype=datetime);
run;
data test;
datetime='25dec2000 00:00:00'dt;
format datetime dtpic.;
run;
There is (see Maxim 8 🙂 ).
It is E8601DT19.
29 data _null_; 30 now = datetime(); 31 format now e8601dt19.; 32 put now=; 33 run; now=2019-05-20T11:03:22
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.