DateDiff in seconds/caculation not correct

Mike Hughes

Registered User.
Local time
Today, 22:12
Joined
Mar 23, 2002
Messages
493
I'm having a problem with this query.

SELECT [TABLE E].USERID, [TABLE E].CASE, [TABLE E].SCREEN, [TABLE E].START, [TABLE E].END, DateDiff("S",[START],[END]) AS SECONDS
FROM [TABLE E];

I will not caculate the correct number of seconds for line 3 in this table. It should be returning 58 Seconds.
Can someone tell me what I'm doing wrong?

START....................................END................ SECONDS
2/17/2009 9:07:37 AM........2/17/2009 9:07:38 AM.........1
2/17/2009 9:12:04 AM........2/17/2009 9:12:06 AM.........2
2/17/2009 9:12:47 AM....2/17/2009 9:13:05 AM.........18
2/17/2009 9:13:05 AM........2/17/2009 9:13:16 AM.........11
2/17/2009 9:13:39 AM....,,,,2/17/2009 9:13:40 AM.........1
 
It looks correct to me. There are 13 seconds between :47 and the next minute, plus the :05 is 18 seconds.
 
What you are doing wrong is your arithmetic.

9:12:47 AM to 9:13:05 AM.....is....18seconds
58 would take you to 9:13:45

Brian

Thats twice in 2 days Paul has just beaten me to the punch. :(
 
It's okay Brian, you're expected to slow down a bit when you retire. :p
 
OK....I just could not see that.....Thanks for making my face red.
 
It looks correct to me. There are 13 seconds between :47 and the next minute, plus the :05 is 18 seconds.

And, just like Paul said, I'll throw another thumbs up that it is doing exactly what it should be doing. It is calculating it just perfectly. How would you figure it should be 58 seconds?
 
And, just like Paul said, I'll throw another thumbs up that it is doing exactly what it should be doing. It is calculating it just perfectly. How would you figure it should be 58 seconds?

Never mind - you saw it already. Sorry.
 

Users who are viewing this thread

Back
Top Bottom