I have a query with 2 fields I wish to multiply together to get a value for a feild, [Hours_Lost]. One is a short time field and one is a number field. The short time field is [Hours] and the number field is [people] I have been trying the following but no luck. Abnyone any ideas?
I am pretty sure that will only multiply the hours and not the minutes. Lose a lot of money if I did that. 40 people with 45 mins each. What I have to do is multiply the whole time.
Since a date/time field is internally a double precision number in days and there are 24 hours in a day, I believed the first expression should also work. It should even work without the need of the CDbl() function.
To test what I believed, I put the following query in the attached database:-
SELECT ID, Hours, People,
[People]*(CDbl([Hours])*24) AS Expr1,
[People]*[Hours]*24 AS Expr2,
((DatePart("n",[Hours])/60)+DatePart("h",[Hours]))*([People]) AS Expr3
FROM tblData;
When the query was run, the three expressions all returned the same results.