Server 2000 date format problem...

Hello, we built a 2000 server sp4 with the US date format. After the build we switched it to UK.
We have an application that parses teh server date into the apps outputs, we're getting problem because the app believes that the server is still in the US format.
I have heard that when a system is built in US format and changed later, that it lieves US date references within the registry, which could be causing our problem. CAn anyone help?
Thanks you
LVL 1
Jason ThomasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
check out the following things:

* SET DATEFORMAT dmy    vs SET DATEFORMAT mdy  
* CONVERT(DATETIME, yourfield_or_value , 101 ) vs CONVERT(DATETIME, yourfield_or_value , 103 )


0
Jason ThomasAuthor Commented:
Thanks angellll, are those VB scripts that i need to run or registry entries, sorry i don't understand?
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
sorry... both are SQL statements:

SET DATEFORMAT
msdn2.microsoft.com/en-us/library/ms189491.aspx

CONVERT()
technet.microsoft.com/en-us/library/ms187928.aspx

another option is to specify the language for the login (in sql server) you use (see screenshot).
the date format will depend on that setting, if you specify english, it will be US date format, if you specify British English, it will be UK format.
sa.bmp
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Jason ThomasAuthor Commented:
Sorry, perhaps I should have explained, the app is DB2, and its output suggests the server is configured for US date format, whichit isn't?
Thank you.
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
ah, sorry... then I am out, DB2 is not my stuff...
however, it should be "similar" stuff available...
0
Jason ThomasAuthor Commented:
Thanks anyway.


Anyone else have any ideas?

0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0
momi_sabagCommented:
i did not understand
you are using a db2 database ?
0
Jason ThomasAuthor Commented:
Hello, yes, we have a DB2 database installed which is generating data (i don't know anymore than that) and it date stamps the data from the servers date settings. It generates mm/dd/yy and not dd/mm/yy as the server is set to.
I don't think this is related to any database setting, more like a bug with the OS as it was deployed with US and change to UK later, which I'm told can cause problems???
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>more like a bug with the OS
no. the database or the session has a (default) setting to print data in a specific format, especially when the data type is date or timestamp.
either you configure and rely on that implicit format, or you go with the explicit format and specify, during query, what format you want the date value to look like in the string output.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
momi_sabagCommented:
the date format returned to you by db2 is set by the territory parameter that was specified when the database was created. there is no way to change that parameter once the database exists, so i don't believe you will be able to use a different data format

you could try to write a user defined function that will convert date to the format you want, but that will require some work on your part
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.