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 |
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2012-09-30 : 00:14:49
|
| Hi,I use the following to convert a date.English:Select CONVERT(DATE, '1-' + 'jan-2012') --> returns 2012-01-01French:Select CONVERT(DATE, '1-' + 'janv.-2012')returns Conversion failed when converting date and/or time from character string.Any idea? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
infodemers
Posting Yak Master
183 Posts |
Posted - 2012-09-30 : 09:16:50
|
| You are right khtan!I also found out, I have the remove the dot in the month name to get it work with the language setting!SET LANGUAGE N'French'Select CONVERT(DATE, '1-' + 'janv-2012')SET LANGUAGE N'English' Select CONVERT(DATE, '1-' + 'jan-2012') Thanks a lot for your help! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|