I am looking to calculate the difference between and event time and a sample
time of Now. This is the query that I thought would do it, however I'm
returning DIFFERENCE values that look the same when the calcuation is being
made on different EVENT_TIME values....
I thought I knew how DateDiff worked, but apparently not.
select GetDate()as NOW,event_time,Datediff(s,(Cast(event_time as
Numeric)),(Cast(GetDate() as Numeric))) as DIFFERENCE
FROM events
-----------NOW----------|-----EVENT_TIME------|-DIFFERENCE
2004-06-30 11:22:38.560 1999-10-30 23:51:37.000 147225600
2004-06-30 11:22:38.560 1999-10-30 23:23:47.000 147225600
2004-06-30 11:22:38.560 1999-10-30 06:49:38.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:50:00.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:50:41.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:49:59.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:49:58.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:50:53.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:50:46.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:49:42.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:50:36.000 147312000
2004-06-30 11:22:38.560 1999-10-30 06:50:07.000 147312000
2004-06-30 11:22:38.560 1999-10-30 10:54:37.000 147312000
2004-06-30 11:22:38.560 1999-10-30 11:40:15.000 147312000
2004-06-30 11:22:38.560 1999-10-30 09:52:51.000 147312000
2004-06-30 11:22:38.560 1999-10-30 12:12:46.000 147225600
2004-06-30 11:22:38.560 1999-10-30 12:32:45.000 147225600
2004-06-30 11:22:38.560 1999-10-30 12:32:45.000 147225600
2004-06-30 11:22:38.560 1999-10-30 12:32:46.000 147225600
2004-06-30 11:22:38.560 1999-10-30 12:46:30.000 147225600
2004-06-30 11:22:38.560 1999-10-30 15:31:25.000 147225600
2004-06-30 11:22:38.560 1999-10-30 23:08:25.000 147225600
2004-06-30 11:22:38.560 1999-10-30 16:35:51.000 147225600
Can someone help?
TIA!
Joe..