date() is your answer, use it in the piece of code generating the query. $DateTime = date("Y-m-d H:i:s); // "2002-02-18 16:10:43"
Niklas -----Original Message----- From: eoghan [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuuta 2002 16:14 To: [EMAIL PROTECTED] Subject: [PHP] date problem hello i am running into some trouble with a very basic problem. i want to insert the current date/time into my db. i have the field set up as a datetime field. when i submit info, i just get a blank date, i mean it all zeros, like 0000-00-00 00.00:00:00. how do i insert the current datetime into my db? i tried using a hidden field with a foramtted gmt date value, but its not working... any help thanks - eoghan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php