Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Convert String Duration to HH:MM:SS

Highlighted
8 - Asteroid

I've got some durations data as strings which I'm having trouble converting to time values because many of them are over 24 hours.  Is there some format I can convert them to that would allow me to sort them by duration.

 

Duration
26:42:41
105:53:56
50:08:01
21:22:50
73:42:05
108:08:11
1:55:12

 

Thank you for your help.

Highlighted
Alteryx Certified Partner

@DHB 

 

Your best bet would be to PADLEFT() the Duration field to a length of 9 padding 0's at the start. This would then allow you to sort the data 

PADLEFT([Duration], 9, '0')

image.png

 

Hope this helps!

Jimmy
Teknion Data Solutions

Highlighted
5 - Atom

Hi DHB,

 

Put in a text to columns tool, splitting on ":"

Then put in a formula, where you convert them all to minutes (e.g., time = hour*60 + minutes + seconds/60)

 

Hope this helps

Highlighted
8 - Asteroid

Thank you both for your solutions - I've cracked it now.

Labels