date to timestamp in javascript

前端 未结 3 2064
忘了有多久
忘了有多久 2021-01-01 03:28

Is it possible in javascript to convert some date in timestamp ?

i have date in this format 2010-03-09 12:21:00 and i want to convert it into its equiva

3条回答
  •  灰色年华
    2021-01-01 04:21

    The getTime() method of Date object instances returns the number of milliseconds since the epoch; that's a pretty good timestamp.

提交回复
热议问题