Dates in PX

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
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Dates in PX

Post by seanc217 »

I have dates in the following format coming in as source data:
YYYYDDD. Where ddd= the day of the year. When I output these dates to our warehouse I know I will have to convert them, but I also have values of 0 in these fields which I would like to convert to null. Is there anyway to do this in PX with a date datatype? The target is an Oracle database.

Thanks.
salil
Participant
Posts: 46
Joined: Thu Oct 13, 2005 5:41 am

Re: Dates in PX

Post by salil »

seanc217 wrote:I have dates in the following format coming in as source data:
YYYYDDD. Where ddd= the day of the year. When I output these dates to our warehouse I know I will have to convert them, but I also have values of 0 in these fields which I would like to convert to null. Is there anyway to do this in PX with a date datatype? The target is an Oracle database.

Thanks.
Try to handle this using function conbinations like:
If ('yyyyddd'[3])='000' then setnull() else DateFromDaysSince()

IHTH
A printer consists of 3 main parts: the case, the jammed paper tray and the blinking red light.
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post by seanc217 »

It looks like this will work well.

Thanks!!!!
Post Reply