Skip to main content
Known Participant
Feb 6, 2023 7:45 AM UTC
Question

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

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
    Feb 6, 2023 8:00 AM UTC

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

    dipaki0002
    Participating Frequently
    Aug 10, 2023 4:25 PM UTC

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

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