Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Converting Time to Integer

jochenw
5 - 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

4 REPLIES 4
AndrewW
11 - Bolide

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.

jdunkerley79
ACE Emeritus
ACE Emeritus

I would use a formula tool:

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

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

nshokeen88
5 - Atom

hi all,

 

 i have a situation i want to convert numbers to Time format like below.

 

Input data 0.024363426

 

Output Result is 0:35:05 

 

please help me to get the output result.

 

Thanks.

Labels