Incorrect datetime value??
Posted: Mon Dec 19, 2005 11:23 am
Hello,
I am attempting to insert in to a datetime column in a MySql database, it seems like I had this working and now its not, but I took a few weeks off of this project so maybe I forgot what happened.
this is how I am creating the date:
Have tired my date formatting without the dashs and colons and space, didnt help.
this is the input box on my form:
this is the error message when I do the insert in to my DB:
Incorrect datetime value: '12-19-05 12:24:13' for column 'requested_date' at row 1
What is the proper format for a date in a MySql DateTime field?? I thought I had it
I am attempting to insert in to a datetime column in a MySql database, it seems like I had this working and now its not, but I took a few weeks off of this project so maybe I forgot what happened.
this is how I am creating the date:
Code: Select all
$requested_date = date('m-d-y H:i:s');this is the input box on my form:
Code: Select all
<input type="hidden" name="requested_date" value="<?php echo "$requested_date"; ?>">Incorrect datetime value: '12-19-05 12:24:13' for column 'requested_date' at row 1
What is the proper format for a date in a MySql DateTime field?? I thought I had it