Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Converting Time to Integer

Highlighted
Atom

Hello,

can anybody help me with my Problem?

How do I convert a time format like for example "00:02:10" into an integer giving me the seconds, in this case "130"?

Is there a tool for it?

 

Thanks,

Jochen

Highlighted
Fireball

I'm unaware of any inbuilt tool to do this however it can be done by parsing the time out to Hours, Mins and Secs, then doing the maths on each component using a formula tool to create a total seconds.

 

I can't post screenshots on this forum so see the attached workflow for an example.

Highlighted

I would use a formula tool:

DateTimeDiff('1900-01-01 ' + [Time],'1900-01-01',"seconds")
Atom

Both solutions work fine. Thanks a lot to both of you.

Labels