$date = "1346706576967"; // miliseconds
$newDate = (int) $date;
echo $newDate;
I am getting "2147483647" as $newDate.
I simply want to convert the variable from String 1346706576967 to int 1346706576967 - how is this possible?
2147483647 is the largest value an integer can hold unfortunately. You could use a float here instead as a float can accurately hold integer values up to 10000000000000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With