one scenario:ANY GENIUS I am struggling
I have 3 columns
col1:1.40(1 minute 40 seconds)datatype(decimal)
col2:1.40(same as above)
col3:1.40(same as above)
I want to add 3 times and get output as 05.00 (min:sec)
in netezza or datastage transformer.
thanks in advance
Time math
Moderators: chulett, rschirm, roy
Okay... not sure how we ended up with three of these posts but there's only one now. And I updated your subject, "datastage" doesn't work all that well seeing as how that's what everything is about here.
That being said, have you looked into the parallel functions? Thinking either the Date and Time functions or the Conversion functions like DecimalToTime could be leveraged. Or go old school and just do straight math... for example, convert 1.40 into 100 seconds (1x60+40) which sum to 300 seconds and then you could break that back down to your minutes and seconds for the target (trunc(300/60).remainder).
That being said, have you looked into the parallel functions? Thinking either the Date and Time functions or the Conversion functions like DecimalToTime could be leveraged. Or go old school and just do straight math... for example, convert 1.40 into 100 seconds (1x60+40) which sum to 300 seconds and then you could break that back down to your minutes and seconds for the target (trunc(300/60).remainder).
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: