View Full Version : how can i do summation to time type field??


suhad
01-17-2007, 09:31 PM
hi,

I have atable with fields time in and time out (short time type), in aquery i did a diffrence between that to fields, so I can know to evry employee every day how many hours work.

but, my problem is how do summation to the work hours to the month (it's a short time type).

example, an employee work from 8:30 to 15:00 in the first day, second day work from 9:10 to 14:20 ....etc
at the end of the month i want to have report from query which give me sum. of hours the employee workes.

thanks to help me

suhad

MStef
01-18-2007, 01:45 AM
I have constructed something, it is not so elegant,
but I think it works.
Look at Table1, Open "query4", look at column "SumOfHours".
Maybe someone know a better way.

neileg
01-18-2007, 01:54 AM
Date/time field types aren't very handy when you need to do maths with them. In the long run it is better to use a number datatype and store the number of, for example, minutes.