DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
bhush
Participant



Joined: 26 May 2017
Posts: 1
Location: india
Points: 23

Post Posted: Sat Jul 20, 2019 1:57 pm Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows
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
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42998
Location: Denver, CO
Points: 221842

Post Posted: Sat Jul 20, 2019 4:43 pm Reply with quote    Back to top    

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. Wink

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

I swore that I would love you to the end of time, so now I'm praying for the end of time to hurry up and arrive
'Cause if I gotta spend another minute with you I don't think that I can really survive
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54534
Location: Sydney, Australia
Points: 295710

Post Posted: Mon Jul 22, 2019 7:12 pm Reply with quote    Back to top    

Convert all to seconds only, do the math, then convert back to your favourite format.

_________________
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42998
Location: Denver, CO
Points: 221842

Post Posted: Tue Jul 23, 2019 8:10 am Reply with quote    Back to top    

So we basically said the same thing, I just used more words this time. Wink

_________________
-craig

I swore that I would love you to the end of time, so now I'm praying for the end of time to hurry up and arrive
'Cause if I gotta spend another minute with you I don't think that I can really survive
Rate this response:  
Not yet rated
qt_ky



Group memberships:
Premium Members

Joined: 03 Aug 2011
Posts: 2868
Location: USA
Points: 21784

Post Posted: Wed Jul 24, 2019 7:31 am Reply with quote    Back to top    

"You guys talk funny! Say more words!" -Patrick Star

_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours