Get epoch for a specific date using Javascript Ask Question

Get epoch for a specific date using Javascript Ask Question

How do I convert 07/26/2010 to a UNIX timestamp using Javascript?

ベストアンサー1

You can create a Date object, and call getTime on it:

new Date(2010, 6, 26).getTime() / 1000

おすすめ記事