Page 1 of 1

subtract two dates

Posted: Mon Feb 14, 2011 8:47 am
by Javieregh
I need to converter this sql calculation to Datastage, both dates are timestamp

result = floor (date1 - date2)

I have the following message

Error in output column derivation expression for column result in link DSLink129. Invalid conversion requested from a timestamp to a dfloat.

Thanks
Javier

Posted: Mon Feb 14, 2011 9:55 am
by XRAY
What is being expected ?

There are some functions in the parallel developer guide on timestamp/date function.You may need to convert the dates into numbers then do the subtraction. Lastly, convert the result back to date....

But is that what you want ?

Posted: Mon Feb 14, 2011 3:35 pm
by ray.wurlod
What data type is the result of subtracting two timestamps?