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 |
arai
Starting Member
1 Post |
Posted - 2010-02-09 : 04:12:07
|
hi.i have error in inseting date...insert into nepengdate values('2067-02-29','2010-06-12')it gives me this error"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.The statement has been terminated."help please...but is doesnot give error in inserting insert into nepengdate values('2067-02-28','2010-06-11') |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-09 : 04:33:44
|
you dont have 29 Feb for 2067 as thats not a leap year. Thats why its an invalid date and error is thrown. |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-02-09 : 09:08:01
|
Also leave the hyphens out - your server locale may not support 'yyyy-mm-dd' whereas all SQL server locale configurations support dates presented in strings as 'yyyymmdd'... that still won't allow you to store 29-Feb-2067 - for that you will need MySQL |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-09 : 09:24:00
|
quote: Originally posted by Kristen Also leave the hyphens out - your server locale may not support 'yyyy-mm-dd' whereas all SQL server locale configurations support dates presented in strings as 'yyyymmdd'... that still won't allow you to store 29-Feb-2067 - for that you will need MySQL
that was a nice one |
|
|
|
|
|