How to convert Moment.js moment to unix timestamp

I see a lot in the Moment.js documentation about getting a Moment from a Unix … Read more How to convert Moment.js moment to unix timestamp

I see a lot in the Moment.js documentation about getting a Moment from a Unix timestamp. However, I am trying to convert a Moment to a Unix timestamp, and I am not sure how to do that. This is how my moment looks:

const myMomentObject = moment(str_time, ‘YYYY-MM-DD’);

And I need to convert it to a Unix timestamp.

Source: JavaSript – Stack Overflow


Categories: NewsTags: ,

Leave a Reply

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