Hello,
I’ve created a 3.0 form, with a calendar (as in the demo). When I process this form, the date that is being processed has the wrong format:
9_!nativeeditor_status updated
9_order_created Fri Mar 25 2011 16:48:49 GMT+0100
9_order_description aangepast3
9_order_number_from_custo… wedwedwedwedefghj
ids 9
My MySQL database is not able to store a date formatted like this: Fri Mar 25 2011 16:48:49 GMT+0100
dateformat used: dateFormat: “%Y-%m-%d %H:%i:%s”
the date is showing correctly in the input field!
Any idea’s?
kind regards, Sitan
I also noticed that when I load the form, and bind data to the calendarfields, the calendar fields contain no data. Other (normal) input fields are correctly filled with data stored in the database.
regards,
Sitan
for the time beeing I’ve created a workaround for the problem
$date_in = $_POST["calendar_date_value"];
$date_out = substr($date_in, 8, 2);
$date_out .= substr($date_in, 4, 3);
$date_out .= substr($date_in, 11, 4);
$dateformatted = date('Y-m-d', strtotime($date_out));
//set 'Y-m-d' to your date field format in your sql database. You can also re-arrange the $date_out variable addition to make the strtotime understand what kind of format of datetime it is getting.
Hi Avanox,
this could be a solution if you handle the incomming data yourself, but I use the dataprocessor and then the date_out field could not be altered before storing it in the database.
regards, Sitan