View Full Version : Calc Difference between Time Fields and multiplying by a currecny field!


sush
03-13-2000, 05:05 AM
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

Travis
03-14-2000, 11:11 PM
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.