I have a series of times and I am trying to find the difference in time between two values which is fine for a normal day however some times pass midnight eg
18:00 - 00:30
The time difference is 6 hours 30 minutes which I would like returned in a numerical value eg 6.5 hours. However whenever I pass midnight it is not calculating properly.
Is there anyway to work around this without having to input the dates on each value? I would like it to assume if I am between the hours of 00:00 & 08:00 then I mean the following morning and anything between 08:01 and 23:59 is from the previous day.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.