Strange Date problem

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Strange Date problem

Post 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 ?
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

what is the problem buddy after this mapping?

some example would be useful to give any inputs.
Regards,
S. Kirtikumar.
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post 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
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post 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?
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post by opdas »

Its date on both side.
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post 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?
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post by opdas »

Yes
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post by opdas »

I tried searching the forum but couldnt find a similar post.
if you could please guide to the right link.
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post 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
Rob Wierdsma
Toronto, Canada
bartonbishop.com
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post 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.
Om Prakash


"There are things that are known, and there are things that are unknown, and in between there are doors"
Post Reply