Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change the date format 1

Status
Not open for further replies.

123Hai

IS-IT--Management
Dec 30, 2002
6
0
0
IN
Hi,

I am getting date from DB2 table in java result set as yyyy/mm/dd .I want to show it as dd/mm/yyyy or mm/dd/yyyy . What is the command for that...

Regards,
Sriram
 
Hi sriram,
Issuing the following SQL:

SELECT CHAR(CURRENT DATE,ISO)
,CHAR(CURRENT DATE,USA)
,CHAR(CURRENT DATE,EUR)
,CHAR(CURRENT DATE,JIS)
FROM SYSIBM.SYSDUMMY1

returns:

COL1 COL2 COL3 COL4
---------- ---------- ---------- ----------
2002-12-30 12/30/2002 30.12.2002 2002-12-30

I also think there's a local option that is defined by your DB2 admin people.
Hope this helps.
Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top