# Coverting miliseconds into HH:mm:ss in logstash

**URL:** <https://discuss.elastic.co/t/coverting-miliseconds-into-hhss-in-logstash/263098>\
**Category:** Logstash\
**Created:** [February 3, 2021, 8:47am UTC](https://discuss.elastic.co/t/coverting-miliseconds-into-hhss-in-logstash/263098 "2021-02-03T08:47:05Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 24, 2021, 5:58pm UTC](https://discuss.elastic.co/t/coverting-miliseconds-into-hhss-in-logstash/263098/3 "2021-02-24T17:58:03Z")

</div>

You could do that with a scripted field in kibana (see [here](https://discuss.elastic.co/t/json-input-converting-minutes-to-minutes-and-seconds/100845) and [here](https://discuss.elastic.co/t/convert-number-into-time-hhss/235494/4) for examples).

In logstash you could do it using a ruby filter. See [here](https://stackoverflow.com/questions/40485828/convert-milliseconds-to-hours-and-mins-in-ruby/40486133) and [here](https://stackoverflow.com/questions/14686649/how-can-i-convert-milliseconds-in-string-format-to-hhmmss-format-in-ruby-in-un) for code examples.

---

_[View the full topic](https://discuss.elastic.co/t/coverting-miliseconds-into-hhss-in-logstash/263098)._
