is there any way to convert date string Tue Feb 23 2016 20:11:42 GMT+0200 (EET)
to timestamp in nodejs?
I was trying to use moment.js with this:
moment('Tue Feb 23 2016 20:11:42 GMT+0200 (EET)', 'YYYY-MM-DD HH:mm:ss').valueOf()
but it returned NaN to me. Maybe its impossible?
There's no need for moment.js
var d = new Date("Tue Feb 23 2016 20:11:42 GMT+0200 (EET)");
var timeStamp = d.getTime();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With