# Display a number field that is defined as duration as Minutes:Seconds

**URL:** <https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135>\
**Category:** Kibana\
**Created:** [May 9, 2017, 4:51pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135 "2017-05-09T16:51:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Davis](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Jeff\_Davis](https://discuss.elastic.co/u/Jeff_Davis)\
**Post date:** [May 9, 2017, 4:51pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/1 "2017-05-09T16:51:01Z")

</div>

I have a field that contains the milliseconds it takes a Windows machine to boot. I have changed the format of the field to duration but none of the output formats will display in minutes:seconds. The closest format to what I need is minutes but that displays the decimal minutes instead of seconds. i.e. if the boot time is 2 minutes and 30 seconds, I would like it to display as 2:30 not 2.50.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/5/b/5b5a1fd9be76523b053f3ac6c0d1d9440d6478a6.png)

[This discussion](https://discuss.elastic.co/t/convert-seconds-float-number-into-a-more-legible-datatype/27257/8) seems similar but I don't see that an issue was ever opened. Before I open an issue I want to make sure I'm not missing something obvious.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 10, 2017, 10:09am UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/2 "2017-05-10T10:09:12Z")

</div>

Hi @Jeff_Davis,

as I mentioned in the discussion you linked, the "Number" format supports [Numeral.js's format strings](http://numeraljs.com/), which means you can enter a time format like `00:00:00` to have your number formatted as `hours:minutes:seconds`.

---

<div class="post-metadata">

**Author:** ![Jeff\_Davis](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Jeff\_Davis](https://discuss.elastic.co/u/Jeff_Davis)\
**Post date:** [May 10, 2017, 12:02pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/3 "2017-05-10T12:02:01Z")

</div>

Thanks @weltenwort, that gets me closer to what I want. Since my field contains milliseconds I created a scripted field that divides the original field by 1000 and then I was able to apply the 00:00:00 time format to that field. For my use case, I don't really need the hours but I can't figure out a way to remove it. I tried [00:]00:00 and 00:00 but neither of those change the output, it still displays the hours.

I'm still tempted to submit an enhancement request since this seems to me like it should be a function of the duration format.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 10, 2017, 12:14pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/4 "2017-05-10T12:14:04Z")

</div>

I agree that duration format should support this kind of formatting. We always appreciate enhancement requests over on [GitHub](https://github.com/elastic/kibana/issues/new). The more background information you add to your request, the easier it will be for a developer to pick it up.

---

<div class="post-metadata">

**Author:** ![Jeff\_Davis](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@Jeff\_Davis](https://discuss.elastic.co/u/Jeff_Davis)\
**Post date:** [May 11, 2017, 1:50pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/5 "2017-05-11T13:50:12Z")

</div>

Thanks, I have submitted an [enhancement request](https://github.com/elastic/kibana/issues/11706).

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 11, 2017, 4:30pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/6 "2017-05-11T16:30:45Z")

</div>

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 8, 2017, 4:36pm UTC](https://discuss.elastic.co/t/display-a-number-field-that-is-defined-as-duration-as-minutes-seconds/85135/7 "2017-06-08T16:36:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
