T O P I C R E V I E W |
angeladoherty |
Posted - 08/23/2006 : 5:53:47 PM Origin Version (Select Help-->About Origin): 6.0 Operating System: WinXp
All all. I have a problem. I have data from a GPS receiver that records the time into 3 separate cells. One for hours, minutes and second. It is puzzling me how I can combine those 3 things into one time code (hh:mm:ss.####). I have tried the good old combine columns things and played a bit with scripts but with no luck. Any ideas?
Thanks, angela |
1 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 08/23/2006 : 10:46:12 PM Hi Angela,
This script will work as long as hour, min and sec columns are 1, 2 and 3...
wks.col=4; wks.insert(Time); // insert Time col at position 4 loop(i,1,4) {wks.col$(i).format=2}; // format cols 1-4 as Text loop(i,1,wks.maxrows) { %Z=col(1)[i]$; %A=col(2)[i]$; %Z=%Z:%A; %A=col(3)[i]$; %Z=%Z:%A; col(4)[i]$=%Z; }; repeat 3 {del col(1)}; // delete first 3 cols wks.col1.format=3; // format col 1 as Time wks.col1.subformat=11; // subformat hh:mm:ss.###
Mike Buess Origin WebRing Member |
|
|