DaysSinceFromDate function

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
studyguy2001
Participant
Posts: 19
Joined: Tue Feb 01, 2005 11:46 pm

DaysSinceFromDate function

Post by studyguy2001 »

Hello.,

problem: i have a column with data type integer. it has to be converted into date and then again the date has to be converted into interger in the output.

i know there is a function in datastage DaysSinceFromDate . this function can ve used to do it.


does anyone has used this function before. if yes then please provide me a sample code.

otherwise does anyone please help me in solving my problem. i have to do that in a parallel extender transformer.

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

Post by ArndW »

Mark,

converting an Integer date (in Julian date format?) to a date and back to an integer should give the same result. The conversion between types needs to know the source and target formats, otherwise it won't work correctly. Do you know your source date format in integer? Why do you need to convert it? The DaysSinceFromDate works well, I have used it before without problems.
studyguy2001
Participant
Posts: 19
Joined: Tue Feb 01, 2005 11:46 pm

Hello

Post by studyguy2001 »

ArndW wrote:Mark,

converting an Integer date (in Julian date format?) to a date and back to an integer should give the same result. The conversion between types needs to know the source and target formats, otherwise it won't work correctly. Do you know your source date format in integer? Why do you need to convert it? The DaysSinceFromDate works well, I have used it before without problems.

my requirement is it use only the DaysSinceFromDate function. i need to use this to implement the business logic.
the source date format is in int32 and the target date format is also in int32.
the business flow ( as decided by BA) the function has to be used in parallel extender trasnformer.in this transformer i have write all my logic of converting the int32 to date and again back to int32 in output.

i sincerely thank you for your reply. And i look farwarrd for your reply

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

Post by ray.wurlod »

my requirement is it use only the DaysSinceFromDate function
Who made that a requirement?
There is usually more than one way to achieve a result in DataStage, being forced to use one method may prevent your finding more efficient techniques.

Neither did you tell us what the integer represents. Is it the date, such as 20050818, or is it an integer number of days since some arbitrary day zero?
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