Flexi Time Query, Can't get the last Calc to work

forman

Registered User.
Local time
Today, 14:16
Joined
Jul 30, 2002
Messages
12
Hi

I'm trying to finish a query that calculates the time worked in the AM and PM, adds them together, then takes that away from the standard working day.

I've done everything else, but when I take the hours worked away from the standard day it always ends up with a positive number, regardless if they haven't worked enough hours.

I've looked through the forums and everyone is talking modules, but thats over my head.

Thanks for looking, apprieciate the help.

Alan
 

Attachments

It's the way the date/time datatype works. Date/time is stored as a decimal number where 0 is 31 December 1899 00:00:00. So your decimal factional negative number is simply a time on the previous day (30 December 1899). The decimal number is correctly calculated in your query but when you format it as hours you don't see that it becomes a different date.

When you need to do maths with times it is usually easier to store the data as a number of minutes and write your own formatting to display it.
 

Users who are viewing this thread

Back
Top Bottom