Forum Academy Marketplace Showcase Pricing Features

Slider value Seconds to time format hh:mm:ss

Hi, I have a slider input range min and max values, which display a range in seconds. In a repeating group, I need to display those values in time format hh:mm:ss. For example, user select:
slider input value min 300
slider input value max 400

In repeating group, I have 2 text elements that need to display
text start: 00:05:00 (300seconds)
text end: 00:06:40 (400 seconds)

I only need to display the data, not save it. If helps, I use this website to calculate the time.

I know this has been covered a lot, and I’ve successfully converted using <-modulo-> and floor, which I didn’t fully understand but it worked. But not to display a list of timestamps on my repeating group. I think it should be very simple but can’t figure it out. I’ve tried unix converter also, but I don’t how to do it properly.
I hope somebody can help me. Thanks in advance.

  1. add Moment.js library to your page header …

  2. You’ll need the tool box plugin

  3. Add an expression
    moment.duration(Your Value), “seconds”).format(“hh:mm:ss”);

  4. Then ref this expression where ever you wish to display the result

Hi, thank you for your answer. But I’m not sure how to add an expression. Could you specify?