# Mikrotik Uptime Readable format

**URL:** https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117
**Category:** General
**Created:** [30 June 2024 17:51 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117 "2024-06-30T17:51:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Nikon](https://avatars.discourse-cdn.com/v4/letter/n/ea666f/32.png) [@Nikon](https://discourse.nodered.org/u/Nikon)
#### Post date: [30 June 2024 17:51 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117/1 "2024-06-30T17:51:15Z")

</div>

Hi All

I'm struggling to find a way to read mikrotik uptime's via snmp traps.

I'm using the snmp node and mikrotik OID but getting an unreadable format in milliseconds.

I've tried date formatters like moment's Humaniser, but i don't want it in date format, i need it to be uptime to see how long the devices are online for example: 1w1d01:20:00

I do get it the functions via the miktrotik node with API, but everytime i get info, i'm flooding my mikrotik log file with logins, i do not want to use API, i need a way to get the uptime format via snmp readable.

---

<div class="post-metadata">

### Author: ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)
#### Post date: [30 June 2024 18:07 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117/2 "2024-06-30T18:07:53Z")

</div>

> [@Nikon](#):
>
> I've tried date formatters like moment's Humaniser, but i don't want it in date format, i need it to be uptime to see how long the devices are online for example: 1w1d01:20:00

without knowing what the snmp output does look like, it's hard to guess what options there are.  
Besides...do you know that moment.js also does provide "duration" objects? Did you try that?

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [30 June 2024 18:31 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117/3 "2024-06-30T18:31:57Z")

</div>

> [@Nikon](#):
>
> unreadable format in milliseconds.

This has been covered many times on this forum. This link will help [Conversion and display milliseconds in the format "dd hh mm ss" - #6 by E1cid](https://discourse.nodered.org/t/conversion-and-display-milliseconds-in-the-format-dd-hh-mm-ss/74951/6)

---

<div class="post-metadata">

### Author: ![Nikon](https://avatars.discourse-cdn.com/v4/letter/n/ea666f/32.png) [@Nikon](https://discourse.nodered.org/u/Nikon)
#### Post date: [1 July 2024 12:47 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117/4 "2024-07-01T12:47:58Z")

</div>

Hi,

I've tried moment.js, but its seems to keep on creating 'n datestamp that i dont want. I tried the date/time formater as well as the humanizer functions, unless i'm missing someting in my flow like a funtion that does not add up to the total sum.

I will look in to the "duration" and try to see if that maybe solve my issue.

---

<div class="post-metadata">

### Author: ![Nikon](https://avatars.discourse-cdn.com/v4/letter/n/ea666f/32.png) [@Nikon](https://discourse.nodered.org/u/Nikon)
#### Post date: [1 July 2024 12:50 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117/5 "2024-07-01T12:50:11Z")

</div>

Thank you E1cid

I will definitely lookin to this topic, its seems like this might solve my problem, i just had a quick look at the original post flow and i see someting that might solve my problem, i just want to work thru this flow to see what he did and try to adjust it to my needs.

I will revert back with if it was sucsessful or not. Thank you for the direction...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [29 September 2024 12:50 UTC](https://discourse.nodered.org/t/mikrotik-uptime-readable-format/89117/6 "2024-09-29T12:50:59Z")

</div>

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