Skip to main content
February 6, 2023
Question

Convert time in seconds to days:hh:mm:ss format

  • February 6, 2023
  • 2 replies
  • 0 views

Hi Team,

I have a requirement of converting time in seconds to days, hours, minutes and seconds. I am using function intervalds() to do the same but I find when I give time (in seconds) for 30 days then the function does not return me the correct value. My required format is ddd:hh:mm:ss

Eg : I tried : intervalds(0,0,2592000) and in response I got : -19::17:02:47.296 (Interval (Day to Second)).

I am using appian version 22.2.

Can someone help me in fixing the above and suggest me if we have any OOTB functions to do the same.

Any help is appreciated.

Thanks in advance.

    2 replies

    stefanhelzle0001
    Brainy
    February 6, 2023

    Why not just divide that number by 60, 60*60 and 60*60*24 and subtract each result to get that?

    dipaki0002
    August 10, 2023

    Looks like this is an old discussion. BTW below OOTB function can be used for your use case

           tointervalds(2592000/(60*60*24))