BusinessDate vs SystemDate

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
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

BusinessDate vs SystemDate

Post by scorpion »

Hi All,

I am trying to populate one of my target column by using below logic:

If (DUE_STLMT_DT + 2415021) > JulianDayFromDate(CurrentDate())

Then 'U'

Else If (DUE_STLMT_DT + 2415021)<=JulianDayFromDate(CurrentDate())

Then 'S' Else ''
But the problem with above code is:

when the job runs midnight it is taking systemdate as current date,,but we need businessdate..

for ex:
if my job runs on 11:30pm on 15aug2007,it is giving 15aug2007 records because it is taking systemdateas current date

but if my job runs 12:30am on 16th it is giving 16aug2007 records
can any one help me to get actual businessdate records

how to implement to pick the records of my actual businessdate
in my above code..
Thanx&Regards
scorpion
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Passing the date as parameter? Instead of currentdate() DateFromString(#BusinessDate#).
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Thanks Maveric it resolved...
Thanx&Regards
scorpion
Post Reply