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 |
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-03-26 : 07:30:41
|
| hi allselect convert(datetime,'29/2/09',103)is giving conversion err..why?regards,aak |
|
|
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2009-03-26 : 07:46:16
|
| select convert(varchar(15),'29/02/09',103) |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-03-26 : 07:47:20
|
2009 is not a leap year. 29 feb 09 is invalid. Moreover, you are using the styles incorrectly.Try this,select convert(datetime,'28/2/09',3)select convert(datetime,'28/2/2009',103) |
 |
|
|
sakets_2000
Master Smack Fu Yak Hacker
1472 Posts |
Posted - 2009-03-26 : 07:48:49
|
quote: Originally posted by ayamas select convert(varchar(15),'29/02/09',103)
thats not the solution. |
 |
|
|
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2009-03-26 : 08:11:16
|
quote: Originally posted by sakets_2000
quote: Originally posted by ayamas select convert(varchar(15),'29/02/09',103)
thats not the solution.
Oops sorry.Missed on the leap year |
 |
|
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-03-26 : 10:02:13
|
Thanks all it should be 28 and not 29 my mistake.Regards,aakquote: Originally posted by sakets_2000
quote: Originally posted by ayamas select convert(varchar(15),'29/02/09',103)
thats not the solution.
|
 |
|
|
|
|
|
|
|