Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Conversion of double Data type to time

Zion777
7 - Meteor

 

 

Hi All,

 

I am trying to calculate "time not allocated" where I have dividing (16/3600/24) i.e. not_allocated_time in sec / expected_break in secs /Hours.

 

I trying to convert to time, I am getting all the expected result.

Attached the sample .yxzp file for your reference.

 

 

S.Nonot_allocated_time in secexpected_break in secsHourstime not AllocatedCalculation(exp)
1163600240:00:1616/3600/24
203600240:00:00 
3403600240:00:40 
4213600240:00:21 
5113600240:00:11 
663600240:00:06 
7153600240:00:15 
813600240:00:01 
943600240:00:04 
2 REPLIES 2
FrederikE
13 - Pulsar

Hey @Zion777,

 

You can calculate this with this formula: 

 

DateTimeAdd('1900-01-01 00:00:00',[not_allocated_time in sec],'seconds')

FrederikE_0-1684828424331.png

 

Advantage of doing it this way is that you can build Alteryx's functions instead of writing a numerical calculation. 

(the 1900-01-01 is just require so its a DateTime and not only a Time, the Date is cut off again anyway). 

 

Zion777
7 - Meteor

Thank you so much for your help, Frederik :)

Labels
Top Solution Authors