Given that code:
$date = '2014-05-22';
$number = strtotime($date);
$number2 = "143134652600";
echo $number;
echo $number2;
echo date('Y-m-d', $number);
echo date('Y-m-d', $number2);
Output:
1400709600
143134652600
2014-05-22
2014-05-22
Why $number
is not equal to $number2
?
and how to convert a Y-m-d '2014-05-22' to the same format as $number2
'143134652600'?
The output I get from that is:
1400731200
143134652600
2014-05-22 00:00:00
6505-10-03 20:43:20
I'm not sure how you get 2014-05-22 for both.