Datatype conversions

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

ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

By doing an integer division of the days by 30 you will get months. It really depends upon the application whether this is "good enough", otherwise one would need to extract the year(s) and month(s) from both variables and perform computations on those values, i.e. "((year2*12)+month2)-((year1*12)+month1)" to get an exact number. That is a lot of conversions to do if it can be with just the DaysSinceFromDate() function.
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post by bhasds »

Thanks a lot ArndW.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That advice looks familiar. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply