Access 2010:
I need to calc the difference between two times then calc a percentage of an hour?
First problem, the above code is giving the following result, adding 12 hours when the difference is less than one hour. See attachment.
[imgnothumb]http://bytes.com/attachments/attachment/6233d1331908530/time-example.jpg[/imgnothumb]
Second problem I cannot find a good example to calc a percentage of an hour. i.e. if the above field "Total_time " = 29:51 then I want to calc 29:51 / 60:00 = .4975
Hope I explained my problem correctly
I need to calc the difference between two times then calc a percentage of an hour?
Code:
!StartTimeStamp1 = StartTime
!EndTimeStamp1 = MDrs("TimeStamp1")
!Total_time = MDrs("TimeStamp1") - StartTime
[imgnothumb]http://bytes.com/attachments/attachment/6233d1331908530/time-example.jpg[/imgnothumb]
Second problem I cannot find a good example to calc a percentage of an hour. i.e. if the above field "Total_time " = 29:51 then I want to calc 29:51 / 60:00 = .4975
Hope I explained my problem correctly
Comment