10-17-2016 03:54 AM
I imported an Excel file (.xlsx) into SAS 9.4 that contains a time variable.
I think I need to do something in a Data Step but I get confused with the time informat versus the time format and can't figure out how to use TIMEAMPM.
The time variable is in this format in Excel. I want to display time like this as well in the SAS output.
This is as far as I got which I know is wrong. Help please!
'Incid_time' variable in Excel converts to this in SAS before attempting to do any manipulation.
9:23 PM converts to 0.414583333 11:36 AM converts to 0.940972222 1:33 AM converts to 0.6111111 2:23 AM converts to 0.34444444 DATA TC_viaEMS; SET viaEMS_2013 viaEMS_2014 ; incid_timeN =input(incid_time, time7.); format incid_timeN TIMEAMPM7.; run;
NOTE 484-185: Format $TIMEAMPM was not found or could not be loaded.
10-23-2016 01:01 AM
Thanks for the suggestion. However, I tried it and still got an error. So I decided to I close SAS, reopened it, and re-ran the original program – and it finally worked.