0

I have date and time in the below Internet Date and Time Format

2020-07-06T06:48:08+0000
2020-07-07T10:02:45+0000

I need to convert this to Unix timestamp using javascript.

Once done, I need to then convert the Unix timestamp back to Internet Date and Time Format

1585859757
1585507012

Any pointers on how to achieve this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Tokyo
  • 201
  • 1
  • 5
  • 18
  • Does this answer your question? [convert iso date to milliseconds in javascript](https://stackoverflow.com/questions/9229213/convert-iso-date-to-milliseconds-in-javascript) – SuperStormer Sep 20 '20 at 19:19
  • Use the `Date` constructor. Notice that JS uses milliseconds since epoch, not seconds, so you'll have to multiply/divide accordingly. – Bergi Sep 20 '20 at 23:16
  • divite by 1000 i guess ? – Tokyo Sep 24 '20 at 10:20

0 Answers0