Sunday 15 April 2012

format - SAS convert numeric variable to time -



format - SAS convert numeric variable to time -

i have numeric variable numbers of form 924 1045 1742 etc. these times.

i want convert them time format 09:24:00.

i can't seem find way of doing this.

informat used hhmmss , format see time want time5:

data have; informat time hhmmss4.; format time time5.; input time; cards; 924 1045 1742 ; run;

if field number in dataset work:

data have; input time; cards; 924 1045 1742 ; run; info want; set have; time_num=input(put(time, 4. -l), hhmmss4.); format time_num time5.; run; proc print;run;

time format sas

No comments:

Post a Comment