Besides:
Date.parse(timestampString)
and
new Date(timestampString).getTime()
???
I am running some benchmarks, and trying to find the fastest/most efficient way to convert a timestamp like '2021-08-07 03:32:05.387089'
to 1628321525387
.
Besides:
Date.parse(timestampString)
and
new Date(timestampString).getTime()
???
I am running some benchmarks, and trying to find the fastest/most efficient way to convert a timestamp like '2021-08-07 03:32:05.387089'
to 1628321525387
.
tl;dr new Date().valueOf()
There is another option:
new Date(timestampString).valueOf()