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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 mysterious ANSI (US) vs UK Date interpretation??

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-20 : 11:54:15
Antony writes "ok - noone has been able to help me on this one so far ....

I inherited an application which had different sql server setups in production and development (the Unicode Locale IDs differed - therefore backups from one couldn't be restored on the other) -
so went down the rebuildm.exe route to sort the problem (making the changes to the Dev SQL Server install) -

all of a sudden the two servers interpret dates differently - the prod box only takes varchar literals in UK format (DD/MM/YYYY or variants thereof) and the dev box has now reverted to the (what I had always thought was the only way SQL Server accepted date literals) - ANSI / US ie MM/DD/YYYY or variants thereof -

having run comparisons of sp_configure results (and yes I have set show advanced options to 1) and then also got all of the sp_dboption values - the two servers and all of the databases have exactly the same settings - (eg codepage, defualtlanguages, sort orders etc.. etc..)

also both NT4 environments have exactly the same Regional settings (though I can't see how this affects the localisation of a SQL Server install - I checked anyway <- was the last straw to clutch at) -

OK - so now I have entirely, supposedly, compatible target and development environments except for the big doosy that all of the date code I write & maintain (this is an ASP WEB front app btw) will now only work properly in the target environment (as all are passed back to the server as strings basically) -

I hope there is something very very obvious that I've missed becuase short of introducing server side date interpretation where all dependancies to these string literals are (and chaising up all of the dependencies is a big big job) - to kind of overload the date functs into reformatting to a format the server is happy with and the switching this with a global variable between environments (not at all ideal) - I'd hope I can flick a magic swicth back that I've obviously missed ...

HELP!!!"
   

- Advertisement -