How to convert a particular date into timestamp?

This question already has an answer here:

  • convert date to timestamp in javascript?

    7 answers

I want to convert a particular date (say 31st October 2017) to the timestamp.

What should be my input and how to convert it into timestamp?



Just use getTime with new Date(date_to_parse)