Excel Working time macros

spath Posts 1 Registration date Wednesday August 10, 2011 Status Member Last seen August 10, 2011 - Aug 10, 2011 at 03:29 AM
 Spath - Aug 10, 2011 at 08:16 AM

I am looking for a macro to extract data between certain hours. My csv has start_time and end_time of driver trips.

I would like to see only the time drivers start_time is greater than 18H00 and less than 06H00, so I can identify when drivers are driving out of working hours.

Any ideas? Thanks in advance


2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Aug 10, 2011 at 07:30 AM
depends upon your excel sheet. pl post a small extract of sheet
tripid;"tripmode";"objectno";"objectname";"start_time";"start_odometer";"start_postext";"end_time";"end_odometer";"end_postext";"duration";"idle_time";"distance";"avg_speed";"max_speed";"fuel_usage";" l/100km";
254505844;"4";"003";"VOLVO XC 60";"01/08/2011 13:14:03";"37273462";"";"01/08/2011 13:14:03";"37318346";"odometer corrected";"0";"0";"44884";"0";"0";"0";"";

Basically, the only fields I would look at is start_time, end_time and distance. I only want to see trips started between the hours of 6pm and 6am (non working hours) and report the distance traveled for these trips.

Hope that help. Thanks in advance