I am using form to post date and time (selection made using datetime picker).Now Selection is working fime, But PHP is misinterpreting the format in which datetime was sent.
$_POST['From'] = "'".date('Y-d-m H:i:s', strtotime(str_replace('-', '/', $_POST['From'])))."'";
$_POST['To']= "'".date('Y-d-m H:i:s', strtotime(str_replace('-', '/', $_POST['To'])))."'";
If i intended to send 14-JULY-2016... I will send it as 14/7/2016, But PHP misinterprets it as 14th month.Hence Invalid time.
Whenever I cross 12th day, I always get 1970-01-01 01:00:00
which is the default when no datetime is provided. Plz Help. Thx in advance.