Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Format to Time from Character

Reply
Occasional Contributor
Posts: 7

Format to Time from Character

I have a field with a value nn:nn:nn.nnn where the 1st nn is Hours, the 2nd nn is Minutes and the 3rd nn is Seconds. I need to convert it to aTIME field.

Super Contributor
Posts: 490

Re: Format to Time from Character

data new;
input x hhmmss.; /* or time.*/
cards;
16:24:46.321
16:24:43.331
16:24:43.111
16:24:43.345
;run;

proc print data=new;
run;
Ask a Question
Discussion stats
  • 1 reply
  • 235 views
  • 0 likes
  • 2 in conversation