Hi:
I imported the metadata from DB2 tables in mainframe using the Plug IN DSDB2. I have a date field defined as
LAST_MAINT_DATE DATE,
in DB2.
Metadata also shows as
LAST_MAINT_DATE DATE, 10
When I view data , I am seeing values as "10767 (1997-06-23)" .
If I change the SQL Type to Char , then the data is displayed in YYYY-MM-DD format.
1. Should i define he metadata as Char , though it is date field ?
2. Is there any setting I am missing ?.
Searched the forum & manuals couldn't get help.
Thanks for your responses in advance.
Rgds,
Nandha
DB2 Date Column - Displays Incorrect in view Data
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 28
- Joined: Fri Jul 29, 2005 3:51 pm
- Location: Arizona, USA
DB2 driver
Howdy!
My understanding of the DB2 drivers are that they only display dates in the internal format when using View Data. If you want to see it differently then you would need to convert it using ICONV (I think). Also, you won't be able to do this in View Data of the driver, but you could place a derivation that will do it for you.
Bestest!
My understanding of the DB2 drivers are that they only display dates in the internal format when using View Data. If you want to see it differently then you would need to convert it using ICONV (I think). Also, you won't be able to do this in View Data of the driver, but you could place a derivation that will do it for you.
Bestest!
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Ahhh, the DB2 plugin. It works differently from other stages like Oracle and ODBC. If the datatype is DATE, it automatically uses ICONV inside the stage. The only way to prevent this is to switch the metadata to CHAR, which relies on the NLS setting of the database for the format, or TIMESTAMP, which makes it look like an ISO date.
You'll have this same issue with the Informix and Sybase stages, both reading and writing.
Make sure when loading you change the metadata as well. I recommend always toggling the DATE to TIMESTAMP.
You'll have this same issue with the Informix and Sybase stages, both reading and writing.
Make sure when loading you change the metadata as well. I recommend always toggling the DATE to TIMESTAMP.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle