How to make operations on date fields

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
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

How to make operations on date fields

Post by jseclen »

Hi Forum,

I'm working in Data Stage Enterprise 7.5.2 in AIX server 5.3, and i need to obtain the difference between two dates, in server version i use iconv for both fields and obtain the result, but in parallel i can't ..

Anybody has an answer ??

Is there another choice to obtain this result??

Thanks
Saludos,

Miguel Seclén
Lima - Peru
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In Appendix A of the Parallel Job Developers Guide is a list of all the Transformer stage functions.

My first guess would be to use DaysSinceFromDate(). In a Modify stage this function is called days_since_from_date()

My second guess would be to apply JulianDayFromDate() to both dates and subtract. In a Modify stage arithmetic is not possible.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply