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 |
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2009-09-14 : 16:57:27
|
09/15/0008I got the below error when i was trying to passed the datevalue..The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.How should i avoid that value.. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-09-14 : 22:07:56
|
1. use ISO format YYYYMMDD2. Your year is 0008 ? SQL 2000 does not support year 0008 KH[spoiler]Time is always against us[/spoiler] |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-09-15 : 08:17:54
|
Hi,are u passing date is correct ( i think it is 09/15/2008 ) ? |
|
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2009-09-15 : 09:49:46
|
sometimes there might be possiblity of passing a date with 09/15/0008 since there are no filters being handled in the front end. |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-09-15 : 10:07:06
|
maybe u can use the isdate() function to check if its a valid date before doing your convert.select isdate('09/15/2009') retuns 1select isdate('09/15/0009') will return 0 |
|
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2009-09-15 : 18:47:02
|
Thanks it helps.. |
|
|
|
|
|