days between two dates

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
arunkumar1111
Participant
Posts: 19
Joined: Sun Jun 29, 2008 10:19 pm

days between two dates

Post by arunkumar1111 »

Hi

I'm using datastage 7.5.2 edition. I need to find difference between two dates. when i gave date1-date2 the error is

Error in Stage Variable derivation expression for variable DateDiff. Invalid conversion requested from a date to a dfloat.


Please can any one help on this.

Thanks and Regards
Arun

Known is a drop and unknown is an Ocean
Thanks and Regards
Arun
Known is a drop and Unknown is an Ocean
dhanashreepanse
Participant
Posts: 25
Joined: Fri Jan 11, 2008 12:49 am
Location: Pune, India

Post by dhanashreepanse »

Use the JulianDayFromDate function for both the dates to convert them to a number.
Then do the subtraction.
And then convert this number back to a date using DateFromJulianDay function.

-Dhanashree.
Post Reply