[ACCEPTED]-Convert UNIX timestamp to milliseconds-gettime
Accepted answer
UNIX timestamps are in seconds. Multiply 1 by 1000.
If you really need proper presentation -- use 1 number_format().
$timestamp = 1305593400;
$ms = $timestamp * 1000;
echo number_format($ms, 0, '.', '');
Result: 1305593400000
I use it
$unix_date = (time("Ymd", strtotime($r->date)) *1000);
0
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.