Hello to all.
I have been at this for 6 hours and have read countless entires in this forum. I have come close......but not close enough.
I am trying to calculate the difference between two times. I can't use a combination of date and time because if I do, those who use the database won't use it. To much info to input. Right now they input a simple time in the form 16:43 to represent 4:43 PM. They are used to, and like that method.
Everything works fine until I span midnight.
Now I have read all the postings about this issue and how datediff can be used with some wacked out formulas.
I can get the proper time by simply using the formula Format([timestart]-1-[Timeend],"Short Time") in a query. However, I need the total time in hours and minutes as a decimal.
Ex. 7:30 would become 7.5
To make things more complicated I need it rounded to the closest 15 minutes.
Ex. 7:35 would become 7.5
7:40 would become 7.75
If there is a way to do this with datediff great!
Now as I mentioned I have already solved the midnight span problem with the formula above but the result is in the form 7:30.
So if someone can just tell me how to get my query field "TIME" from 7:30 to another field TIMENUM as 7.5 even better
If someone can tell me how to get field TIMESTART and TIMEEND to give me a decimal number EVEN WHEN THE TIMES SPAN MIDNIGHT....well then you are a genius.
Take that one step further to the closest 15 minute interval and you are a genius and my hero =-)
I have been at this for 6 hours and have read countless entires in this forum. I have come close......but not close enough.
I am trying to calculate the difference between two times. I can't use a combination of date and time because if I do, those who use the database won't use it. To much info to input. Right now they input a simple time in the form 16:43 to represent 4:43 PM. They are used to, and like that method.
Everything works fine until I span midnight.
Now I have read all the postings about this issue and how datediff can be used with some wacked out formulas.
I can get the proper time by simply using the formula Format([timestart]-1-[Timeend],"Short Time") in a query. However, I need the total time in hours and minutes as a decimal.
Ex. 7:30 would become 7.5
To make things more complicated I need it rounded to the closest 15 minutes.
Ex. 7:35 would become 7.5
7:40 would become 7.75
If there is a way to do this with datediff great!
Now as I mentioned I have already solved the midnight span problem with the formula above but the result is in the form 7:30.
So if someone can just tell me how to get my query field "TIME" from 7:30 to another field TIMENUM as 7.5 even better
If someone can tell me how to get field TIMESTART and TIMEEND to give me a decimal number EVEN WHEN THE TIMES SPAN MIDNIGHT....well then you are a genius.
Take that one step further to the closest 15 minute interval and you are a genius and my hero =-)