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-06-06 : 08:16:57
|
I am using VB6/SQL Server 2000. I have a module which performs some calculations on the basis of given 2 dates ('From date' and 'To date'). My regional setting is DD-MM-YYYY. Some time this module works fine and some times it raises error i.e. "The conversion of a char data type to a datetime data type resulted in an out of range datetime value.". I tried to change date format as MM-DD-YYYY in my code but problem remains there. Pls. help me, how to overcome this issue. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-07 : 04:03:05
|
try to pass the dates in iso format (yyyy-mm-dd hh:mi:ss).that would avoid this conversion problem from happening. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-07 : 09:24:25
|
And if there is no need to deal with time part you can use'20090607' for example because it sounds like your app gives the date to sql server as CHAR always. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|