How to set localization on MSDE?

I have localization in my OS set to Britian, so the date times are DD/MM/YYYY.  Can I (and if so how) change the localizatoin on the MDSE running on the machine to properly accept these DateTime objects as valid DateTimes?  

Right, now, it throw an error because the day is too high.  

LVL 5
jjacksnAsked:
Who is Participating?
 
mokuleConnect With a Mentor Commented:
You can also use
SET DATEFORMAT dmy
0
 
ptjcbCommented:
Control Panel - Regional Settings or options. That is what controls how SQL Server (or MSDE) sees a date.
0
 
jjacksnAuthor Commented:
ptjcb - that's what i changed, and that didn't work for MSDE.  at least in my testing.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
jjacksnAuthor Commented:
I've tried both inserting a datetime as a string in the correct format DD/MM/YYYY and as a DateTime object in .NET both while the region was set to English (UK) and both gave a SQL error that the date could not parsed.  
0
 
rafranciscoCommented:
As mokule suggested, try issuing the statement SET DATEFORMAT dmy before issuing your INSERT statement.
0
 
jjacksnAuthor Commented:
do I need to do this before every insert?
0
 
rafranciscoCommented:
If the default DATEFORMAT is not in the dmy format, then yes you have to do this before every insert.
0
 
jjacksnAuthor Commented:
how can i set the default date format?
0
 
rafranciscoConnect With a Mentor Commented:
The default date format can be set in Control Panel --> Regional Options --> Date Tab.  But setting this will affect the whole server, not just SQL Server.
0
 
jjacksnAuthor Commented:
the default date should have been set by me setting my computer to British English, shouldn't it?  it changed everything else on my computer
0
 
rafranciscoCommented:
Changing the default date format in Regional Options will change all date formats in your computer and not just SQL Server.
0
 
jjacksnAuthor Commented:
can i query this value somehow to see what it is?
0
 
rafranciscoCommented:
I am not aware of any way to determine the default date format from SQL Server.
0
 
jjacksnAuthor Commented:
according to this link from MSDN (on my local machine) SQL Server 7.0 no longer depends on the OS for internationalization.  

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dnsql2k/html/intlfeaturesinsqlserver2000.htm#intlfeaturesinsqlserver2000_topic5

I'm currently searching for a way to change the column collation.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.