How can I subtract two dates in a Parallel JOB?

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
igorbmartins
Participant
Posts: 161
Joined: Mon Mar 17, 2008 10:33 am

How can I subtract two dates in a Parallel JOB?

Post by igorbmartins »

How can I subtract two dates in a Parallel JOB?
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Re: How can I subtract two dates in a Parallel JOB?

Post by nirdesh2 »

Use the transformer stage and Date function to substract 2 dates..
Nirdesh Kumar
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

DaysSinceFromDate() Returns the number of days from source date to the given date
You are the creator of your destiny - Swami Vivekananda
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

date1 and date2 are two parameters to the function

Code: Select all

DaysSinceFromDate(date2, date1)
You are the creator of your destiny - Swami Vivekananda
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Depends on what you want as your output. Do you need the date or the number of days between the dates? If you are interested in Date as an output, you can convert the dates in Julian, find the difference and then convert it back to Gregorian. I have done that in the past successfully.
Kris

Where's the "Any" key?-Homer Simpson
manikumar
Participant
Posts: 4
Joined: Sat Jul 03, 2010 8:30 am
Location: mail
Contact:

dayssincefromdate

Post by manikumar »

anbu wrote:date1 and date2 are two parameters to the function

Code: Select all

DaysSinceFromDate(date2, date1)

Before answering question see once.dont give wrong answers.how to subtract dates using dayssincefromdate .once u go through the syntax
Post Reply