Possibly a version issue then as I am running on:
9.04.01M3P062415
OS: LIN X64
Did you see the difference part of my code with your code ?
low-high='%Y-%0m-%0d %0H:%0M:%0S '
Probably not ideal, but I always have numeric and char representations of these types of things (in our industry models this is standard as well), so I would do:
data art;
input id id_c date1 date2;
datalines;
343 565 1.8362E9 .
3435 4546 . -3.592E9
;
run;
proc format;
picture dtpic
other='%Y-%0m-%0d %0H:%0M:%0S ' ( datatype=datetime);
run;
data test;
set art;
if date1 ne . then char_date1=put(date1,dtpic.);
if date2 ne . then char_date2=put(date2,dtpic.);
run;
I would question why you do not use T to separate date and time, as shown in standard - and that is international standard - ISO dates, e.g:
YYYY-MM-DDTHH:MM.SS
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.