From seconds to time format HH:mm:ss

0
Hi! currently doing some calculations that result in an x amount of seconds (string) that can go from a range of 1-86.400 senconds (last value being the maximum of seconds in a day) i need to show to the costumer, this seconds in format HH:mm:ss but im not sure of how to write the format variable, i found the documentation confusing.    I try with formatDateTime(addSeconds([%BeginOfCurrentDay%], round($waitingseconds)), 'HH:mm:ss') $waitingseconds being the total amount of second that a costumer need to wait before beign attended. is the “waiting time”. the thing is, this formula allow me to be use when creating a string variable, but i need to provide a date and time type to the atribute, how shoul I pass this string to date and time?  
asked
1 answers
1

Hi Constanza,

 

Did you try to parse the datetime from your string variable? You're on the right track. Create the string variable as: formatDateTime(addSeconds([%BeginOfCurrentDay%], round($waitingseconds)), 'dd-MM-yyyy HH:mm:ss').

Then create a datetime variable by using parseDateTime($yourstringvariable, ‘HH:mm:ss’).

 

Hope this helps!

answered