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
rafidwh
Participant
Posts: 179 Joined: Mon Oct 10, 2005 11:30 pm
Post
by rafidwh » Wed Oct 10, 2007 9:37 am
HI All,
I need to add 365 days to a date which is in yyyymmdd format.
I am using the function DateFromJulianDay(JulianDayFromDate(DSLink3.Date)+365)
But the output is *******.
The input datatype is Integer and output is also integer.
How to apply this logic.
Regards,
Rafidwh
rafidwh
Participant
Posts: 179 Joined: Mon Oct 10, 2005 11:30 pm
Post
by rafidwh » Wed Oct 10, 2007 9:40 am
Iam sorry input and output datatypes are char.
If Iam giving Integer then the job is giving a compilation error
DeepakCorning
Premium Member
Posts: 503 Joined: Wed Jun 29, 2005 8:14 am
Post
by DeepakCorning » Wed Oct 10, 2007 10:07 am
Is this a delivered Routine or something custom??
You will need to find what arguments it takes as input and you may have to oconv the output in order to get the result.
Thanks
Deepak Patil
Convince Them Confuse Them .. What's the difference?
ravibabu
Participant
Posts: 39 Joined: Tue Feb 13, 2007 12:18 am
Location: vijayawada
Post
by ravibabu » Wed Oct 10, 2007 12:11 pm
Hay ,
Use the Type conversion function like stringtodate and datetosting.
Bye
turash
Premium Member
Posts: 51 Joined: Fri Apr 06, 2007 10:09 am
Location: Edison, NJ
Post
by turash » Wed Oct 10, 2007 12:15 pm
If your source is RDBMS you can do that at database level using dateadd (sybase) or their variants in other RDBMS.
rafidwh wrote: HI All,
I need to add 365 days to a date which is in yyyymmdd format.
I am using the function DateFromJulianDay(JulianDayFromDate(DSLink3.Date)+365)
But the output is *******.
The input datatype is Integer and output is also integer.
How to apply this logic.
Regards,
Rafidwh
DSguru2B
Charter Member
Posts: 6854 Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX
Post
by DSguru2B » Wed Oct 10, 2007 12:27 pm
Convert your char date into a valid date format by using StringToDate() and the 365 days using one of the parallel functions, cannot remember it off the top of my head. I know its there.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Oct 10, 2007 4:10 pm
Try applying DateFromDaysSince() function to the date after converting from string.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.