I am facing one problem,
I have hardcoded date vlaue as "1900-01-01" in transformer and loading the same into a table. In
table it is getting converted into "12/31/1899" i.e one day less.
I am using DB2 API stage and in transformer I have coverted the date into StringToDate("2005-01-01","%yyyy-%mm-%dd") .
Any help on this would be appreciated
Thanks!
Ramendra
Problem while loading date into a table
Moderators: chulett, rschirm, roy
one day less
I am experiencing the same issue and wondering if there is an explanation. I have the following PX job:
seq --> xfm --> DB2/UDB API
There is a date field in the incomoing data with YYYY-MM-DD format. The coressponding field in the DB2 database is of type Date. In the tranform stage, I am using the StringToDate function to convert to date data.
The value of the date field in the DB2 table is always one day less.
Thanks
seq --> xfm --> DB2/UDB API
There is a date field in the incomoing data with YYYY-MM-DD format. The coressponding field in the DB2 database is of type Date. In the tranform stage, I am using the StringToDate function to convert to date data.
The value of the date field in the DB2 table is always one day less.
Thanks
Re: one day less
Instead of writing to a db2/udb write to a peek and see if you are getting the correct result. This is very weird, unless DS has a HUGE bug in the DB2 stage.cnguyen wrote:I am experiencing the same issue and wondering if there is an explanation. I have the following PX job:
seq --> xfm --> DB2/UDB API
There is a date field in the incomoing data with YYYY-MM-DD format. The coressponding field in the DB2 database is of type Date. In the tranform stage, I am using the StringToDate function to convert to date data.
The value of the date field in the DB2 table is always one day less.
Thanks
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
The TZ environment variable needs to be set to GMT
Technical Support acknowledged that this is a known issue. The workaround was to set TZ=GMT. Once this was set, the correct date was inserted into the Db2 table.
Thanks
Thanks