Incorrect query result????

G

Guest

Some help please. I have a query that subtracts date/time (b) from
date/time(a), let's say that the result (formatted hh:nn:ss) is (c). I then
created a report and for summary options I chose Min, Max, Avg (of c).
Reviewing the report for the last couple of days everything was looking fine
.... until today the query results is as follows:-
date/time(a) = 3/20/2006 3:20:05 PM date/time(b) = 3/15/2006 3:05:53 PM
differnce(c) = 00:14:12. The report shows this difference as the MAX
(difference?), when, in reviewing the query, there are differences greater
than 00:14:12. Am I missing something here, any suggestions?
 
A

Allen Browne

The difference between 3/20/2006 3:20:05 PM and 3/15/2006 3:05:53 PM is not
14 minutes 12 seconds: it is several days. If you do not suppress the date
part of the result, you will see a strange date in 1900 representing the
number of days after what Access calculates as day zero.

For suggestions on handling differences between date/time fields, see:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html
The article explains how to calculate the differences in minutes (or
seconds) and display the results.
 
G

Guest

Allen,
Thank you very much
--
thanks as always for the help
jer

Allen Browne said:
The difference between 3/20/2006 3:20:05 PM and 3/15/2006 3:05:53 PM is not
14 minutes 12 seconds: it is several days. If you do not suppress the date
part of the result, you will see a strange date in 1900 representing the
number of days after what Access calculates as day zero.

For suggestions on handling differences between date/time fields, see:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html
The article explains how to calculate the differences in minutes (or
seconds) and display the results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top