Originally Posted by
jungmanish
Hi
I want to input data in hh:mm format with value greater than 24:00 as its cumulative hours so can be any value
for example
Date HH:MM
May 1 50:10
May 2 53:20
Right now i am not being able to enter hours above 24:00 as it is taking it as time not as hour and minute
You can enter time interval as
FlightDate TotalTime
01.05.2018, 02.01.1900 02:10
02.05.2018, 02.01.1900 05:20
Or when those time intervals are totals over flights in given date, you enter info as
FlightDate FlightNo, FlightStart, FlightEnd
01.05.2018 1 01.05.2018 02:00 01.05.2018 23:00
01.05.2018 1 01.05.2018 05:00 01.05.2018 20:00
01.05.2018 1 01.05.2018 12:00 01.05.2018 22:00
01.05.2018 2 01.05.2018 16:00 01.05.2018 20:10
02.05.2018 1 02.05.2018 02:00 02.05.2018 23:30
02.05.2018 1 02.05.2018 05:00 02.05.2018 21:10
02.05.2018 1 02.05.2018 12:00 02.05.2018 22:30
02.05.2018 2 02.05.2018 16:00 02.05.2018 21:10
And then to get total times (with same result as above) you run a query like
Code:
SELECT FlightDate, SUM(FlightEnd-FlightStart) AS [TotalTime], INT(SUM(FlightEnd-FlightStart)*24) AS TotalHrs, ((SUM(FlightEnd-FlightStart)*24) - INT(SUM(FlightEnd-FlightStart)*24))*60 AS TotalMin GROUP BY FlightDate
The 3rd possibility (You enter sum of flight times for certain plane/route) falls out, as there is now way you having next day over 53 hours of total time for same plane/route
Edit: This example shows also, why is it better to enter start and end times (with dates), and let Access to calculate time intervals - it is at least weird for user to enter dates at start of past century all time!
Edit: There was a typo in SQL string what I corrected.