Alteryx Designer Desktop Discussions

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

Convert decimal time to hh:mm:ss

rimaissa
6 - Meteoroid

Hi, trying to figure out how to convert a decimal time, 1.22 to 01:13. 2.53 to 2:32 (rounded). Is there a way to do this in Alteryx?

5 REPLIES 5
binuacs
20 - Arcturus

@rimaissa One way of doing this by multiplying the decimal part to 60 and then add the minutes to the result

binuacs_0-1657577999996.png

 

 

 

 

PhilipMannering
16 - Nebula
16 - Nebula

Another way of doing this,

 

 

ToDateTime([Time]/1440)

 

 

PhilipMannering_1-1657622925603.png

 

 

binuacs
20 - Arcturus

@PhilipMannering very simple and excellent solution !!!

PhilipMannering
16 - Nebula
16 - Nebula

@binuacs Thank you, yeah I just discovered this.

 

So todatetime([Value]) - where [Value] is a number - will just add days to "1899-12-30 00:00:00". So to add minutes you can just divide [Value] by the number of minutes in a day (1440) and set the output data type to "Time".

rimaissa
6 - Meteoroid

Thank you both!! LIFE SAVERS!!

Labels