Forum Academy Marketplace Showcase Pricing Features

Resolved: Formatting number to time

My app requires that users upload a song and then set a start time for a 20 second music sample. This all works well. I use a slider input to let the user select a start time and have a text number beside it to show what second they are on.
I would like to have the number show in minutes and seconds instead of counting up to 300. is there any way to do this?
Here is a link to the test page which will better show what i am trying to do:


1 Like

so im assuming this cant be done?

Well you can do the math: calculate the number of minutes. And then the remaining number of seconds. Bubble’s math functions are enough for this.

1 Like

ok so i figured this out. i had to use conditional formatting so that when slider input A’s value is greater than or equal to 60 then change the text to 1.sliderinput A’s value-60. I then created the same conditions for 120, 180 and so on to equal the total value of my slider. thanks emmanuel! sometimes im so dumb haha

1 Like

I figured out a better way to do this without using conditions.
slider input A’s value /60 - 0.5 :rounded to 0 : slider input A’s value <- modulo -> 60
I also added a condition so that 1:1 now equals 1:01.

I had no idea what modulo was so reading the reference pages helps a ton!