I know this is simple, but other posts are not working for me. Maybe it is the formatting. I need to split the 1st column (Datetime) into 2 columns. (date) and (hour). Date column should remain in the same format and positions 9 and 10 are the hour. data work.ace_profiles_test;
set work.'new ace_profiles_test'n;
Date=substr(datetime,1,8);
hour=substr(datetime,9,2);
date=input(datetime, date9.) ; /*format date date9.; */
run;
DATETIME FORECAST RECORDER 01Oct2017 0:00:00 1.786429151 NJAMS 01Oct2017 1:00:00 1.594529522 NJAMS 01Oct2017 2:00:00 1.532611857 NJAMS 01Oct2017 3:00:00 1.408968173 NJAMS 01Oct2017 4:00:00 1.452870258 NJAMS 01Oct2017 5:00:00 1.48028587 NJAMS 01Oct2017 6:00:00 1.429192766 NJAMS 01Oct2017 7:00:00 1.466590829 NJAMS 01Oct2017 8:00:00 1.653212565 NJAMS 01Oct2017 9:00:00 1.629932182 NJAMS 01Oct2017 10:00:00 1.845873452 NJAMS 01Oct2017 11:00:00 1.995616508 NJAMS 01Oct2017 12:00:00 2.215903722 NJAMS 01Oct2017 13:00:00 2.189244802 NJAMS 01Oct2017 14:00:00 2.326021186 NJAMS 01Oct2017 15:00:00 2.434289859 NJAMS 01Oct2017 16:00:00 2.346286646 NJAMS 01Oct2017 17:00:00 2.498229065 NJAMS 01Oct2017 18:00:00 2.163318795 NJAMS 01Oct2017 19:00:00 2.117043808 NJAMS 01Oct2017 20:00:00 2.285380221 NJAMS 01Oct2017 21:00:00 2.319593889 NJAMS 01Oct2017 22:00:00 2.271841793 NJAMS 01Oct2017 23:00:00 2.033073233 NJAMS
... View more