Link to home
Start Free TrialLog in
Avatar of Jay Thomas
Jay ThomasFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

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 )


Avatar of Jay Thomas

ASKER

Thanks angellll, are those VB scripts that i need to run or registry entries, sorry i don't understand?
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
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.
ah, sorry... then I am out, DB2 is not my stuff...
however, it should be "similar" stuff available...
Thanks anyway.


Anyone else have any ideas?

i did not understand
you are using a db2 database ?
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???
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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