Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-02 : 07:25:23
|
| Ganesh writes "where et.event_type_code = 'changed_lead_status' -- or and e.id_event_type = 6 and def.name = 'id_disposition_old'and datediff(s, t.unparked_date, e.when_start) > = 0 and t.unparked_date between @start_date and @end_dateGiving problem/ErrorServer: Msg 535, Level 16, State 1, Line 49Difference of two datetime columns caused overflow at runtime." |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2005-05-02 : 17:02:58
|
| Without seeing the input values, Im guessing it is the limitation of datediff with seconds that is throwing this error.Read in BOL:"DATEDIFF produces an error if the result is out of range for integer values. For milliseconds, the maximum number is 24 days, 20 hours, 31 minutes and 23.647 seconds. For seconds, the maximum number is 68 years." |
 |
|
|
|
|
|