I have a stata dataset containing times generated with this code:
I am using [export sasxport] to convert the Stata files to SAS transport files but when I convert the SAS transport files to SAS datasets and view the data in SAS the time formats do not appear correct.
Here's a screenshot of how I see the data in SAS. Does any anybody know if/how I can format the time so that it is recognised and formats correctly going from Stata -> SAS XPORT -> SAS dataset?
STRT_TM is just an unformatted character variable.
STRT_TMF is where I'm expecting to see a nicely formatted time

Code:
generate strt_tmf = clock(strt_tm, "hm") format strt_tmf %tcHH:MM
Here's a screenshot of how I see the data in SAS. Does any anybody know if/how I can format the time so that it is recognised and formats correctly going from Stata -> SAS XPORT -> SAS dataset?
STRT_TM is just an unformatted character variable.
STRT_TMF is where I'm expecting to see a nicely formatted time

Comment