Quote:
Originally Posted by Marcus_A
If you want to guarantee that the date returned in ISO format (YYYY-MM-DD), then use the following:
select CHAR(date-column, ISO)
|
Yes. That's what we try to do temporarily.
Before the sp returns the date to IBM WebSpere Server, we CHAR(date-column, ISO).
But that's not ultimate way, is it?

Each time when writting a sp, you need to CHAR(date-column, ISO).
But even if you forget to do so, you will not notice, cause only some of the workstations get a
2010-21-01 from the DB.
I have googled, then found an article.
DB2 Basics: Fun with Dates and Times
In my case, I believe the date-format in database is IBM USA.
Code:
International Standards Organization
ISO
yyyy-mm-dd
1991-10-27
IBM USA standard
USA
mm/dd/yyyy
10/27/1991
IBM European standard
EUR
dd.mm.yyyy
27.10.1991
Japanese Industrial Standard Christian Era
JIS
yyyy-mm-dd
1991-10-27
And the article stated that we could configure the date-format for database by issuing:
Code:
On Windows: c:\program files\IBM\sqllib\bnd
On UNIX:/home/db2inst1/sqllib/bnd
db2 connect to DBNAME
db2 bind @db2ubind.lst datetime ISO blocking all grant public
Is there any drawback with the command?
I mean if I change the date-format from mm/dd/yyyy to yyyy-mm-dd, dont know if it will cause any un-expected behavior.