# Timestamps operation

**URL:** <https://discourse.nodered.org/t/timestamps-operation/70967>\
**Category:** Hardware\
**Created:** [21 November 2022 10:37 UTC](https://discourse.nodered.org/t/timestamps-operation/70967 "2022-11-21T10:37:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jipi](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@jipi](https://discourse.nodered.org/u/jipi)\
**Post date:** [21 November 2022 10:37 UTC](https://discourse.nodered.org/t/timestamps-operation/70967/1 "2022-11-21T10:37:46Z")

</div>

Hello, I have a problem with the use of timestamps.  
I want to make the difference between 2 timestamps and convert them to H:min:s.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 November 2022 11:22 UTC](https://discourse.nodered.org/t/timestamps-operation/70967/2 "2022-11-21T11:22:31Z")

</div>

Welcome to the forum.

There are various ways to do that in node-red including using JSONata in a change node and JavaScript in a function node. Indeed, if the input timestamp data is in the correct format, you could do it with a simple subtraction.

You need to share with us the input data format.

---

<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:** [20 January 2023 11:23 UTC](https://discourse.nodered.org/t/timestamps-operation/70967/3 "2023-01-20T11:23:25Z")

</div>

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