# Add Unix Timestamp and Javascript Timestamp converstions to the date/time app

**URL:** <https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127>\
**Category:** Feature Requests\
**Tags:** data-transformation, transform-date, date-time\
**Created:** [January 10, 2024, 2:15pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127 "2024-01-10T14:15:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ibanez1998](https://avatars.discourse-cdn.com/v4/letter/i/4da419/32.png) [@Ibanez1998](https://community.n8n.io/u/Ibanez1998)\
**Post date:** [January 10, 2024, 2:15pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/1 "2024-01-10T14:15:44Z")

</div>

## The idea is:

The Date and Time app has 7 actions. I suggest adding two to easily convert Unix and Javascript timestamps.

## My use case:

I’m exporting Zillow API data and all the listing date/times and change date/times are in Unix Time Stamp (aka milliseconds) Example: listingDateTimeOnZillow: 1699724220000.

## I think it would be beneficial to add this because:

Having this to convert to mm/dd/yyyy or any other format needed would help us not have to implement a code block with javascript to process such a remedial task.

## Any resources to support this?

> **[Unix TimeStamp - Epoch Converter - TimeStamp Converter](https://unixtime.org/)**
>
> Epoch and unix timestamp converter for developers. Date and time function syntax reference for various programming languages.

## Are you willing to work on this?

Do I even possess this capability? LOL

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [January 10, 2024, 2:32pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/2 "2024-01-10T14:32:47Z")

</div>

Hey @Ibanez1998,

You can already do this in the Date & Time node, I have put an example below for you. You may also be able to do this in an expression using [Luxon](https://docs.n8n.io/code/luxon/).

Let me know if either of these approaches work for you.

---

<div class="post-metadata">

**Author:** ![Ibanez1998](https://avatars.discourse-cdn.com/v4/letter/i/4da419/32.png) [@Ibanez1998](https://community.n8n.io/u/Ibanez1998)\
**Post date:** [January 10, 2024, 5:32pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/3 "2024-01-10T17:32:34Z")

</div>

That’s great news! A bit obscure though if I think about it. Perhaps it can still be added as an actual action to make it more visible of a solution?

---

<div class="post-metadata">

**Author:** ![Ibanez1998](https://avatars.discourse-cdn.com/v4/letter/i/4da419/32.png) [@Ibanez1998](https://community.n8n.io/u/Ibanez1998)\
**Post date:** [January 10, 2024, 5:34pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/4 "2024-01-10T17:34:24Z")

</div>

Hey @Jon , thanks for all the help quick question for you. Is there a way to pass multiple date fields (perhaps like search for all of them) and have the modification done?

---

<div class="post-metadata">

**Author:** ![lightcom](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lightcom/32/36289_2.png) [@lightcom](https://community.n8n.io/u/lightcom)\
**Post date:** [January 11, 2024, 12:40pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/5 "2024-01-11T12:40:02Z")

</div>

Use set node to modify time in the value field

check my mini help to find modification to your needs  
if $json.body.listingDateTimeOnZillow is unix miliseconds  
{{DateTime.fromSeconds($json.body.listingDateTimeOnZillow/1000).toFormat(‘yyyy-MM-dd HH:mm:ss’)}}  
// Output: 2023-10-13 17:23:58

{{DateTime.fromSeconds(new Date().getTime()/1000).toFormat(‘yyyy-MM-dd HH:mm:ss’)}}  
// Output: 2023-10-13 17:23:58

{{Math.floor(new Date().getTime() / 1000)}}  
// Output: 1573041058

{{new Date().getTime()}}  
// Output: 1573041058024

{{new Date().toISOString()}}  
// Output: 2019-11-06T11:50:58.025Z

{{new Date().toString()}}  
// Output: Wed Nov 06 2019 12:50:58 GMT+0100 (Central European Standard Time)

{{new Date().toLocaleDateString()}}  
// Output: 11/6/2019

{{ new Date().toISOString(“en-GB”`, {timeZone: "Europe/Moscow"`}).replace(‘T’, ’ ').slice(0, -5) }}  
// Output ISO: 2022-12-04 21:26:27

2023-02-21T22:43:59+03:00 to unix - {{Date.parse( $json.body.date) / 1000}}  
if 2023-04-03T08:20:33Z - {{ DateTime.fromISO($json.create\_time).toFormat(‘yyyy-MM-dd HH.mm’) }}

plusmonths:  
{{DateTime.fromISO($json[“body”][“date”]).plus({ months: $json[“months”] }).toUnixInteger()}}

{{Math.floor(new Date().getTime() / 1000)+30}} - unix+30 secomds

another example - [Google Calendar How do I set up a notification in advance? - #3 by nle](http://community.n8n.io/t/google-calendar-how-do-i-set-up-a-notification-in-advance/14528/3)

---

<div class="post-metadata">

**Author:** ![Ibanez1998](https://avatars.discourse-cdn.com/v4/letter/i/4da419/32.png) [@Ibanez1998](https://community.n8n.io/u/Ibanez1998)\
**Post date:** [January 20, 2024, 4:06pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/6 "2024-01-20T16:06:21Z")

</div>

@Jon thoughts on adding it to Date/Time to make it clearer?

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [January 22, 2024, 9:52am UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/7 "2024-01-22T09:52:28Z")

</div>

Hey @Ibanez1998,

It is kind of already there and is easy enought to do, It can also be done with Luxon in expressions but while I personally don’t think we need this if the community vote for this then it would be something to add.

---

<div class="post-metadata">

**Author:** ![RichardC](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/richardc/32/17300_2.png) [@RichardC](https://community.n8n.io/u/RichardC)\
**Post date:** [April 12, 2025, 7:12pm UTC](https://community.n8n.io/t/add-unix-timestamp-and-javascript-timestamp-converstions-to-the-date-time-app/35127/8 "2025-04-12T19:12:32Z")

</div>

For anyone looking for a simple answer like me, I just made this:
