I'm now inserting a date/time
data into my date/time field
in the database. I have tried many techniques such as:
$date = date("d M Y");
$date = date("d M Y", mktime());
$date = getdate();
$date = date("d M Y", strtotime('now'));
and also this function: date_default_timezone_set('Asia/Bangkok');
but it still does not get the datetime.
This is my sql statement:
$sql = "INSERT INTO ".TABLE_CONTENT."(`title`, `detail`, `crdate`, `modate`, `crby`, moby, isdel) VALUES('".$title."', '".$detail."', '".$crdate."', '".$modate."', '".$crby."', '".$moby."', $isdel)";
After performing the query I got only the 0000-00-00 00:00:00
in my database.
Any help or suggestion would be very appreciated.
Thanks