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?
 
Guy Hengel [angelIII / a3]Connect With a Mentor 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
 
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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
 
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
 
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
All Courses

From novice to tech pro — start learning today.