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 |
m-snel
Starting Member
6 Posts |
Posted - 2011-04-26 : 08:02:49
|
Hello,I have an old application that runs on sql server 2000. I managed to get it working with sql server 2005 (for my new 64 bit windows 7 computer). I only have one problem: when I execute a report which uses a date, the interpretation is wrong (mdy instead of dmy). I attached a screenprint with the error.The application cannot be changed, so how can I make sql server 2005 express use the dmy format? I'm a complete novice with sql server so please keep that in mind when answering.In front I'd like to thank you very much for your efforts to help me. |
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-26 : 08:28:02
|
You post your query or see this will help youselect convert(varchar,getdate(),101)---this is my systme current dateOutput:-04/26/2011select Convert(varchar,getdate(),103) ---this is my systme current dateOutput:-26/04/2011Raghu' S |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2011-04-26 : 08:28:24
|
a. invesitgate your regional settings - either your pc#'s version or the erver versionb. investigate the "set dateformat DMY" construct. |
|
|
m-snel
Starting Member
6 Posts |
Posted - 2011-04-26 : 08:50:40
|
The query is embedded in the application itself (the application connects directly to sql server, both are installed and configured in the same setup). I see the picture with the error message is not embedded (how can I embed a jpg in my message)?Changing the regional settings in Windows itself is not an option because other programs are affected (also the regional settings are correct for my region (Europe), so I shouldn't have to change that to US style). |
|
|
m-snel
Starting Member
6 Posts |
Posted - 2011-04-27 : 03:36:24
|
There is no way to configure SQL server 2005 express that if it gets a date from a query it should interpret it as dmy instead of mdy? The mentioned application is the only application that uses the server so if a change goes throughout the server it isn't a problem. |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-04-27 : 07:14:34
|
Can you do this by changing the default language setting from English to British English as described here? http://msdn.microsoft.com/en-us/library/ms191448.aspxThat of course, assumes that the language setting currently is English and that you are allowed to change it. |
|
|
m-snel
Starting Member
6 Posts |
Posted - 2011-04-27 : 08:05:22
|
That put me in the right direction, thanks!!!! I solved it by changing the language setting in the user with SQL Server Management Studio Express |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2011-04-28 : 07:21:30
|
Good to hear a collective effort had a useful result. |
|
|
|
|
|
|
|