# View the duration of the stopwatch in USC

**URL:** <https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874>\
**Category:** Ask for Help\
**Created:** [September 16, 2021, 9:08pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874 "2021-09-16T21:08:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Crossley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adam_crossley/32/24083_2.png) [@Adam\_Crossley](https://community.glideapps.com/u/Adam_Crossley)\
**Post date:** [September 16, 2021, 9:08pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/1 "2021-09-16T21:08:16Z")

</div>

As far as I can tell from the documentation we are supposed to format the duration data in GS to get a readable figure. How do I do that with USCs?

Using the Date/Time column to try and format the duration isn’t working as I expected, and the number column of course doesn’t work either.

A side question - what are the uses for having the start time column if data is removed after we stop or pause?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 16, 2021, 9:25pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/2 "2021-09-16T21:25:56Z")

</div>

The start time is recorded when you start the stopwatch. This is so the script knows the elapsed time between the current time and when you started the stopwatch. When you pause the stopwatch, then it writes that elapsed value (in number of days) into the duration…so when you start the stopwatch again, it records the new start time and calculates the elapsed time from the new start time to the current time, but also adds the previous duration. They are really used to help the stopwatch script calculate the total elapsed time even when you pause and start the stopwatch multiple times. Stopping the stopwatch clears both values, so the script knows that no time has elapsed.

What exactly are you trying to get out of the duration column? It only holds the value that was elapsed prior to pushing the pause button. It translates to the number of elapsed days where the stopwatch was running prior to pressing pause. How would you expect to display that as a date?

---

<div class="post-metadata">

**Author:** ![Adam\_Crossley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adam_crossley/32/24083_2.png) [@Adam\_Crossley](https://community.glideapps.com/u/Adam_Crossley)\
**Post date:** [September 16, 2021, 9:40pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/3 "2021-09-16T21:40:05Z")

</div>

That’s what I suspected. So there is no use for it to the user, it’s just a necessary column we must have in order for it to work?

I was hoping to be able to view the duration without an additional math column in the format you see given in the documentation when formatted in GS. Is that possible?

---

<div class="post-metadata">

**Author:** ![Adam\_Crossley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adam_crossley/32/24083_2.png) [@Adam\_Crossley](https://community.glideapps.com/u/Adam_Crossley)\
**Post date:** [September 16, 2021, 10:05pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/4 "2021-09-16T22:05:27Z")

</div>

I guess there could be some visibility benefits to having that column. Basically acting as an on/off indicator.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 16, 2021, 10:06pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/5 "2021-09-16T22:06:16Z")

</div>

More or less, yes, it’s correct that they are both work fields for the stopwatch to function properly. You could populate them from outside of the stopwatch component if you had a need to do that for some reason. Also you can use actions to capture those values.

What is your end goal though? What are you trying to show the user? The stopwatch itself shows the duration. Are you trying to save that value to use elsewhere? I guess I’m trying to understand your use case better.

I took a quick peek at the documentation and I’m assuming you want to convert that decimal duration value to a friendly format. I also looked at David’s example app and I feel it not quite a good example. It works fine as long as you pause before submitting the form…but if don’t don’t hit the pause button, the duration will not be populated when you submit the form. If you start the stopwatch, pause it after 5 seconds, wait 5 seconds, the start it again for another 5 seconds…it will show 10 total seconds, but if you submit without pausing, then the form will only save the duration prior to the first pause, which is 5 seconds instead of 10. That’s where it’s important to factor in the start time as well if it’s populated. It’s really important to understand how those two fields work. I think you will need to do some math no matter what, but that all depends on your specific use case first.

---

<div class="post-metadata">

**Author:** ![Adam\_Crossley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adam_crossley/32/24083_2.png) [@Adam\_Crossley](https://community.glideapps.com/u/Adam_Crossley)\
**Post date:** [September 16, 2021, 10:12pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/6 "2021-09-16T22:12:05Z")

</div>

That answers my question. I appreciate the offer but I don’t need to share my use case.

Thanks!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 16, 2021, 10:13pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/7 "2021-09-16T22:13:31Z")

</div>

Also, if you are looking to convert that decimal value to a friendly format, then you can check this out. It’s not a one column or no column solution, but would work without Google sheets. I don’t really trust setting column formats in Google sheets anyway.

> [@Time duration not presenting correctly in glide chart stopwatch](https://community.glideapps.com/t/time-duration-not-presenting-correctly-in-glide-chart/24014/6):
>
> I took it a step further and included Days as well. You can exclude it if you don’t need it. It’s a little involved, but I’ll explain the best I can. Here is my results: First we have the Duration column, which is obvious and what you already have. Next we have the Days column: FLOOR(D)/100 This is simply taking the duration and dropping off the decimals. The division by 100 will be explained later. Next we have the Hours column: FLOOR(MOD(D,1)\*24)/100 Th…

If you can capture the start time, current time, and the duration, then you can do the math to get a total duration at the time of capture.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:50pm UTC](https://community.glideapps.com/t/view-the-duration-of-the-stopwatch-in-usc/31874/8 "2024-01-17T16:50:40Z")

</div>


