# Convert Seconds to Duration

**URL:** <https://community.glideapps.com/t/convert-seconds-to-duration/40820>\
**Category:** Ask for Help\
**Created:** [April 18, 2022, 1:01am UTC](https://community.glideapps.com/t/convert-seconds-to-duration/40820 "2022-04-18T01:01:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 18, 2022, 2:12am UTC](https://community.glideapps.com/t/convert-seconds-to-duration/40820/2 "2022-04-18T02:12:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/9/e940bcf8d92e1cc1d4000e50e8e98f21cf771f7f.jpeg)

You can use this in a JavaScript column.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f5a62a88be818326ddbc26035e235216ae88e7ba.png)

```auto
return new Date(p1 * 1000).toISOString().substr(11, 8)

```

Original answer:

> <https://stackoverflow.com/questions/1322732/convert-seconds-to-hh-mm-ss-with-javascript/1322771#1322771>

---

_[View the full topic](https://community.glideapps.com/t/convert-seconds-to-duration/40820)._
