I unfortunately can't use DateTime()
as the server this project is on is running PHP v.5.2.
the line in question:
$aptnDate2 = date('Y-m-d', $_POST['nextAppointmentDate']);
throws the following error:
Notice: A non well formed numeric value encountered
so I var dump to make sure it's well formatted..
var_dump($_POST['nextAppointmentDate']);
string(10) "12-16-2013"
The php docs state that it takes a timestamp not a string. but when I do:
date('Y-m-d', strtotime($_POST['nextAppointmentDate']));
and then var_dump
the result, I get this:
string(10) "1969-12-31"
why can I not format a date with this date value and strtotime()?
thanks!
DateTime()
? Thank you for your help. :) – Antipodal