Getting date -1 value

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
ethanr
Participant
Posts: 23
Joined: Fri Apr 11, 2008 9:37 am
Location: Delhi

Getting date -1 value

Post by ethanr »

Hi

I am passing a date parameter(22-10-2008) as an input to a column. I need, output as given date -1. I tried
date -1 in transformer stage, but job not getting compiled. Is this not the right way to get DATE -1 . How can this be achieved.

Thanks
Thanks, EthanR
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DateFromDaysSince() function
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Your input parameter date is a string. In a transform stage, preferably in the stage variables, convert the string to a date. Then apply the DateFromDaysSince() function to the date and use that in the transform. If you use the "initial value" for the stage variables then they will only be computed once, not for every row.
Post Reply