Subtracting 2 dates in Transformer

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have some more tuna. :P
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Uuugghh Diets suck. Watching me on the treadmill is like watching a walrus try to hoola hoop. Not pretty.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

Hi,


If you are not frustrated with me till now , well... you will now :wink: because I was making a very silly mistake.

I enclosed the DSLink.Date1 in quotes , I had to put the values as
Iconv(DSLink.Date1[1,10],'DYMD') instead I did
Iconv('DSLink.Date1[1,10]','DYMD') .


I greatly appreciate all your help. Thanks a lot.


Regards
Preethi
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Rats, no donut.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post by JDionne »

JDionne Tosses Kcbland a tofu donut

enjoy :lol:
Sure I need help....But who dosent?
hiral.chauhan
Premium Member
Premium Member
Posts: 45
Joined: Fri Nov 07, 2008 12:22 pm

Subtracting dates in Transformer

Post by hiral.chauhan »

Probably most people know this by now, but there's an easier way to subtract dates in transformer (not BASIC transformer.. the one in 8.1.0)

DaysSinceFromDate(CurrentDate(),DSLink21.PROD_DT)

Result = 26

In my example CurrentDate() is 3/26/2009 and DSLink21.PROD_DT = 2/28/2009

(There was actually a function to do this!!! lol..

and I was going through Iconv and Oconv.. and BASIC.. )

Hope this saves time for any other newbie like me :)

Cheers !!

Hiral
Thanks,
Hiral Chauhan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Maybe so, but this is a discussion in the Server Edition forum on how to do this in a Server job, not a Parallel job. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
hiral.chauhan
Premium Member
Premium Member
Posts: 45
Joined: Fri Nov 07, 2008 12:22 pm

Post by hiral.chauhan »

chulett wrote:Maybe so, but this is a discussion in the Server Edition forum on how to do this in a Server job, not a Parallel job. :wink: ...
My bad ! now I see why I did not find this topic anywhere else.. :P
Thanks,
Hiral Chauhan
Post Reply