Forum Academy Marketplace Showcase Pricing Features

Inputting duration of time as MM:SS.Milliseconds

Hi there

I am new to bubble, and have faced my first major headache.

I am a swimcoach, and is creating an app that can store my swimmers results from the different tests we conduct in training.

My problem is that i dont know how to setup an input entry, where bubble recognizes it as a duration. I want to be able to write certain times of a swimmer, and use that data afterwards for conducting different analysis (average of all times, fastest, slowest etc.)

I want to be able to input the duration of the swim as MM:SS.Milliseconds. For example, if a swimmers swims 100m in 1 minute, 2 seconds and 34 milliseconds, i want to type in 01:02.34.

Furthermore, i want to be able to add several times together. For example a time of 01:02.34 + 01:05.04 = 02:07.38

How is this possible?

The best is to convert everything to ms and use a formatter to display it
So let’s add three input field: MM:SS:MS
When user click to save, you create a DB thing with a number field = (input mm*60000)+(input ss*1000)+input ms

You will be able to sum this number field.
I don’t know actually if there’s a good converter for duration that exist, but if not, there’s probably some JS you can use for that (toolbox or create your own private plugin)

Thanks for this reply.

This kinda makes sense to me. As i am new, i will try to fiddle around with it, and get back if i have problems or get it to work :slight_smile:

1 Like