londonkiwi
Programmer
Can anyone put me on the right direction for the structure and approach, perhaps code??
HH:MM:SS DD-MM-YY DR SPEED WBASE HDWY AX G CL TYP WHEEL-PICTURE
13:01:12 04-10-00 AB 71.1 2.6 58.7 2 2 1 SV o o
13:09:05 04-10-00 BA 91.3 2.8 >1 hr 2 2 1 SV o o
13:09:43 04-10-00 BA 57.7 2.6 37.7 2 2 1 SV o o
08:54:37 05-10-00 BA 68.8 6.1 535.9 3 3 2 SVT o o o
09:05:12 05-10-00 BA 73.8 2.7 634.8 2 2 1 SV o o etc
I need to: Group times into the following periods (hours), 0-6, 7-12, 13-18, 19-24 (ie 0,6,12,18,24), for each day. The column CL can have values 1-13. The column DR (direction) can be AB (1) or BA (2). For each day, I need to count the number of instances of each kind of CL values for each direction (AB or BA) and time period, and write them to a file.
Something like this: (filename,date, time period,DR, Total of CL (1-13) values for that period eg, CL 1 could have occurred 20 times
kiwi42,04-10-00,0,1,0001,0024,0000,0002,0200,0023,0001,0000,0450,0000,0003,0005,0001
kiwi42,04-10-00,0,2,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
kiwi42,04-10-00,6,1,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
kiwi42,04-10-00,12,2,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
kiwi42,05-10-00,18,1,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
I realise that reading this data into an array would be the smartest thing to do. I have started by trying to compared two dates, but got lost in the nesting of my arrays.
cheers lk [sig][/sig]
HH:MM:SS DD-MM-YY DR SPEED WBASE HDWY AX G CL TYP WHEEL-PICTURE
13:01:12 04-10-00 AB 71.1 2.6 58.7 2 2 1 SV o o
13:09:05 04-10-00 BA 91.3 2.8 >1 hr 2 2 1 SV o o
13:09:43 04-10-00 BA 57.7 2.6 37.7 2 2 1 SV o o
08:54:37 05-10-00 BA 68.8 6.1 535.9 3 3 2 SVT o o o
09:05:12 05-10-00 BA 73.8 2.7 634.8 2 2 1 SV o o etc
I need to: Group times into the following periods (hours), 0-6, 7-12, 13-18, 19-24 (ie 0,6,12,18,24), for each day. The column CL can have values 1-13. The column DR (direction) can be AB (1) or BA (2). For each day, I need to count the number of instances of each kind of CL values for each direction (AB or BA) and time period, and write them to a file.
Something like this: (filename,date, time period,DR, Total of CL (1-13) values for that period eg, CL 1 could have occurred 20 times
kiwi42,04-10-00,0,1,0001,0024,0000,0002,0200,0023,0001,0000,0450,0000,0003,0005,0001
kiwi42,04-10-00,0,2,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
kiwi42,04-10-00,6,1,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
kiwi42,04-10-00,12,2,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
kiwi42,05-10-00,18,1,0001,0023,0000,0002,0100,0023,0001,0000,0430,0000,0003,0005,0001
I realise that reading this data into an array would be the smartest thing to do. I have started by trying to compared two dates, but got lost in the nesting of my arrays.
cheers lk [sig][/sig]