01-22-2013 10:42 AM
In the above table i got value column after so many calculations.
In time column i just applied time format in excel can we do the same in sas.
Used excel format 37:30:55.
Please help me its urgent for me.
01-22-2013 10:58 AM
SAS stores time as the number of seconds since midnight. Excel is storing it as a fraction of a day. So to convert your variable VALUE to a variable that you could treat as time in SAS you need to mulitply by 24 hours.
66 data want ;
67 input value time time. ;
68 time2 = value*'24:00:00't ;
69 format time time2 time.;
70 put (_all_) (=);
value=0.00036548 time=0:00:32 time2=0:00:32
value=0.0022222 time=0:03:12 time2=0:03:12
value=0.0005 time=0:00:43 time2=0:00:43
01-22-2013 11:03 AM
Just another way
input value time time8.;
format time time8.;
01-22-2013 11:07 AM
I think he wanted to know how to create the 'time' variable from the 'value' variable instead of reading both. Your example is just reading values, there is no calculation.