John said:
.....
If you have a table containing date/time fields named Field1 and
Field2 (which should obviously be changed to something meaningful!),
then create a new Query based on the table. Select Field1 and Field2
(if you want to see them, it's not essential); and in a vacant Field
cell at the top row of the query grid type
Field3: DateDiff("n", [Field1], [Field2])
If Field1 contains #10:00am# and Field2 contains #11:30am# then Field3
will contain an integer 90, the number of minutes between those two
times.
John W. Vinson[MVP]
Taking this further, please take a look at this Expression:
Field1 = [StartTime] = time I enter my office
Field2 = [EndTime] = time I leave office and go home
Field3 = [StandardTime] = time I am supposed to be in the office ( 8.5
hours or 08:30 )
Day: [EndTime] - [StartTime] - [StandardTime]
Entering office at 8AM and leaving at 5PM, I have been present 09:00
which is plus 00:30
Entering at 8AM and leaving at 4PM, I have been present 08:00 which is
minus 00:30
In a Query Expression however, both examples result in a positive 00:30
(absolute value)
Not going to work at all, gives a + 42:30 each week. That is an easy way
to make a living.
What can I do? Would like to Sum workdays each week, changing formatting
won't work.
Rob