How to convert date into unix time?

If I have a date that looks like this?

Sun, Nov 14, 2021 04:52:00PM

How can I convert this into unix time?

I did new Date(‘Sun, Nov 14, 2021 04:52:00PM’)
and .getTime() to it however i get returned NaN?

Is there a way of doing this moment or js?

Source: JavaSript – Stack Overflow

November 15, 2021
Category : News
Tags: javascript | momentjs

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.