Hi there,
i've been struggling on a problem converting datetime format to ISO8601
here is my code:
$string = $_REQUEST['sched-date']." ".$_REQUEST['sched-start'];
$start_string = date("Y-m-d H:i", strtotime($string));
$newformat = date('c',$start_string);
echo "String: ".$string;
echo "\n";
echo "ISO Format: ".$newformat;
AND Here is the output:
String: 07/30/2015 07:45 AM
ISO Format: 1969-12-31T17:33:35-07:00
You will notice that the ISO output is not correct. can you help me with this?
Thanks in advance.
Neil