# Timestamp ? to date/time

**URL:** <https://discourse.nodered.org/t/timestamp-to-date-time/34344>\
**Category:** General\
**Created:** [16 October 2020 11:14 UTC](https://discourse.nodered.org/t/timestamp-to-date-time/34344 "2020-10-16T11:14:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinisz](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@vinisz](https://discourse.nodered.org/u/vinisz)\
**Post date:** [16 October 2020 11:14 UTC](https://discourse.nodered.org/t/timestamp-to-date-time/34344/1 "2020-10-16T11:14:35Z")

</div>

Hi All,

Not quite sure on how to ask this.  
I have a payload (updatetime) which contains something like a timestamp. (pic2)  
The strange thing is however that I thought it was EPOCH time, but is seems shorter.  
However, when I click on that number in the debug window, it changes to a date/time. (pic1)  
That date/time is what I need as output of the flow, but how to convert this ?  
If I convert it like if it was epoch , then I get a completely wrong date/time (in 1970)  
Someone can help me out here ?  
 ![afterclick](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fcffe32377e74c65fe8349d34ff6ae6b38b6bc9d.png) ![pic1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/1/e1cdfdb2e0bf514e446572598726d0bf6a115ffe.png)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [16 October 2020 11:27 UTC](https://discourse.nodered.org/t/timestamp-to-date-time/34344/2 "2020-10-16T11:27:50Z")

</div>

The number is probably in seconds. Your conversion may be expecting mS so maybe multiply by 1000

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 October 2020 08:31 UTC](https://discourse.nodered.org/t/timestamp-to-date-time/34344/3 "2020-10-17T08:31:11Z")

</div>

That looks like a valid javascript time.  
How are you converting it so that you get 1970?

---

<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:** [16 December 2020 08:31 UTC](https://discourse.nodered.org/t/timestamp-to-date-time/34344/4 "2020-12-16T08:31:14Z")

</div>

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