Record time to the hundredths of a second

I would love to track my son’s swim times in Coda but unfortunately it appears that time isn’t a format in a text field. To clarify I am wanting to record time to this format:

05:37.86 or 00:52.24

Essentially, minutes, seconds and hundredths of a second

From there I believe I can setup a formula to collect all times of a particular event (100 breaststroke) and show the best time he swam that event.

This correct. Text is simply - well - text.

But, you should be able to store a duration as a text string and parse when performing evaluations. The following is PTP (precision time protocol) which is used in the slow-mo video and broadcast industry.

00:00:01.150230 (i.e., 150.230 milliseconds)

The first three digits after the decimal is thousandths and PTP brings in another three digits of precision. For swimming events milliseconds is probably enough.

While Coda doesn’t support PTP or milliseconds natively in time or duration fields, you are free to employ arbitrary formats in text. The challenge comes when utilizing the text and performing computations on them. But, there are plenty of formula functions to help.

You might also consider using separate fields to store the numeric parts of the value and then use a formula to join them for computations/sorting and/or display.

Hi @ampersandee,

At first, I knew this would take a little work, because like @Bill_French mentioned, we’re having to mix Text and Numbers and have the end result display like text but act like a number. It was a fun brainteaser and I wanted to see if I could find a way to make it work.

Some of the challenges aside from calculating the data in minutes and seconds were sorting since minute differences might be different than seconds differences, displaying a “+” or “-” to show whether this a current race was faster or slower than a Personal Record, and being able to use columns for various things like conditional formatting.

There may be some ways to simplify this setup, but I left it as is because it’s easier to pick apart when it’s broken down into smaller chunks.

Let me know if this is at least a solution you were looking for…even if it is a little in depth.

4 Likes

I edited the example to add a “Total Time in Seconds” column which makes the “PR” canvas variable an easier filter for finding the fastest time.

This is amazing, thanks so much for taking on the challenge… exactly what I was looking for @BenLee!