# Expression tag to convert minutes to hh:mm:ss

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-to-convert-minutes-to-hh-mm-ss/9154>\
**Category:** Ignition\
**Created:** [October 7, 2014, 8:50pm UTC](https://forum.inductiveautomation.com/t/expression-tag-to-convert-minutes-to-hh-mm-ss/9154 "2014-10-07T20:50:34Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [October 30, 2018, 12:59pm UTC](https://forum.inductiveautomation.com/t/expression-tag-to-convert-minutes-to-hh-mm-ss/9154/10 "2018-10-30T12:59:11Z")

</div>

IMO, it can just as easily be done without script.

- start from a date (midnight)
- add minutes or seconds like you want (needs to be integers, if you want high precision, you can add milliseconds as integers)
- format as “HH:mm:ss”

This doesn’t work if the hours value can reach more than 24 hours, but apart from that, it’s quite concise and easy to understand IMO.

```auto
dateFormat(
	addSeconds(
		getDate(1970,1,1),
		toInt({Root Container.value} * 60)
	),
	"HH:mm:ss"
)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/expression-tag-to-convert-minutes-to-hh-mm-ss/9154)._
