Calc Difference between Time Fields and multiplying by a currecny field!

sush

Registered User.
Local time
Today, 08:24
Joined
Feb 8, 2000
Messages
29
Thats a large subject line!!

Anyway

I want to work out the difference between two times, both of which are date/time fields and then multiply this by a rate, i have tried this

Hours/Mins*24*rate

this works only if the hours/mins is of a whole number.

if i have a figure of 9.35 hours/mins - i recieve a incorrect figure.

can any body help??

thanks

sushil
 
use the DateDiff Function with "mm" or minutes

(DateDiff("mm",FirstDate,SecondDate) /60) * rate

Dividing the Minute difference by 60 will put time in Hours/Tenths of Hours /Hundreths of hours (1/100 of an hour is approx 36 seconds)

You may need to work with rounding but this should do what you want.
 

Users who are viewing this thread

Back
Top Bottom