Page 1 of 1

Strange Date problem

Posted: Mon Jul 31, 2006 5:42 am
by opdas
Hi,
I'm facing this very strange Date problem where I'm mapping a Date field of DB2 API(Source) to another DB2 API(Target) with a transformer in between at the target the date becomes:

Target Date= Source Date - 1 Day :shock:

where as Timestamp mapping is working fine.

Any clues ?

Posted: Mon Jul 31, 2006 5:46 am
by Kirtikumar
what is the problem buddy after this mapping?

some example would be useful to give any inputs.

Posted: Mon Jul 31, 2006 5:50 am
by opdas
My source-target date field mapping is one-to-one.

Suppose my source date is 2006-07-28 but i find the same date has been converted to 2006-07-27 in target

Posted: Mon Jul 31, 2006 5:54 am
by balajisr
opdas wrote:My source-target date field mapping is one-to-one.

Suppose my source date is 2006-07-28 but i find the same date has been converted to 2006-07-27 in target
What is the date format in your source and target?

Posted: Mon Jul 31, 2006 5:58 am
by opdas
Its date on both side.

Posted: Mon Jul 31, 2006 6:02 am
by balajisr
opdas wrote:Its date on both side.
what is the format of the date? is it yyyy-mm-dd as given in the example?

Posted: Mon Jul 31, 2006 6:32 am
by opdas
Yes

Posted: Mon Jul 31, 2006 7:01 am
by chulett
This problem sounds familiar. I believe if you search you'll find at least one other mention of this - and that it is a known bug. :?

Posted: Mon Jul 31, 2006 7:56 am
by opdas
I tried searching the forum but couldnt find a similar post.
if you could please guide to the right link.

Posted: Mon Jul 31, 2006 12:53 pm
by rwierdsm
In the original post you refer to the timestamp being fine.

Are the date and time two different fields or have you truncated the timestamp component in your example?

We had a similar problem (not in DB2) where the query tool was rounding off part of the timestamp, causing the date to get incremented or decremented by one. The actual data in the data base was OK; just the display settings for the query tool were incorrect. Perhaps this is the same thing.

Rob

Posted: Mon Jul 31, 2006 8:06 pm
by opdas
We have direct one-to-one mapping date mapped to date field and Timestamp mapped to timestamp.
The timestamp in the target is fine but the date is reduced by one day.