Hi,
I am trying to insert a date into a field in the format of YYYY-MM-DD. I have tried several ways, but it isn't inserting into the database correctly.
My SQL statement I am using is:
but when I am viewing it in phpmyadmin I see the result:
02/11/09 1
My field has been set to type VARCHAR.
Anyone know how to do it?
I am trying to insert a date into a field in the format of YYYY-MM-DD. I have tried several ways, but it isn't inserting into the database correctly.
My SQL statement I am using is:
PHP:
$sql="INSERT INTO $tbl_name(itpname, detail, author, externalurl, datetime)VALUES('$itpname', '$detail', '$author', '$externalurl', curdate())";
but when I am viewing it in phpmyadmin I see the result:
02/11/09 1
My field has been set to type VARCHAR.
Anyone know how to do it?








