Jay Thomas
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
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
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/ms 189491.asp x
CONVERT()
technet.microsoft.com/en-u s/library/ ms187928.a spx
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
SET DATEFORMAT
msdn2.microsoft.com/en-us/
CONVERT()
technet.microsoft.com/en-u
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
ASKER
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.
Thank you.
ah, sorry... then I am out, DB2 is not my stuff...
however, it should be "similar" stuff available...
however, it should be "similar" stuff available...
ASKER
Thanks anyway.
Anyone else have any ideas?
Anyone else have any ideas?
please check out this article:
http://www.ibm.com/developerworks/db2/library/techarticle/0211yip/0211yip3.html
http://www.ibm.com/developerworks/db2/library/techarticle/0211yip/0211yip3.html
i did not understand
you are using a db2 database ?
you are using a db2 database ?
ASKER
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???
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
* SET DATEFORMAT dmy vs SET DATEFORMAT mdy
* CONVERT(DATETIME, yourfield_or_value , 101 ) vs CONVERT(DATETIME, yourfield_or_value , 103 )