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 |
|
sha_agrawal
Starting Member
24 Posts |
Posted - 2009-07-03 : 11:05:59
|
| I am running a update query on the basis of from date and to date. Some time it works fine and some times it throws an error 'Conversion of char date type to datetime data type resulted in an out of range datetime value'. As per some of the experts of this forum, I changed date format as "YYYY-MM-DD", even now some times it does not work. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-07-03 : 11:20:04
|
I think the problem is within your data.Try:select * from table where isdate(your_column) <> 1That will show your records with bad data. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-05 : 02:57:50
|
quote: Originally posted by webfred I think the problem is within your data.Try:select * from table where isdate(your_column) <> 1That will show your records with bad data. No, you're never too old to Yak'n'Roll if you're too young to die.
isdate is not completely reliable you might need to add extra condition like LEN(your_column)>=8 if you're looking for format YYYY-MM-DD |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|