Re: Current date & time in MySQL datetime format

From: Date: Sat, 22 Jun 2002 18:23:43 +0000
Subject: Re: Current date & time in MySQL datetime format
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103410@lists.php.net to get a copy of this message
Phil Schwarzmann wrote:
I want to produce the current date & time in a MySQL datetime format that I can then put into a MySQL database. How do I do this? I've tried mktime() and getdate() but it's not working. Thanks!!
If you want to do it with mysql (i.e. insert the current time) use NOW() (the mysql function) for example INSERT INTO foo (date) VALUES (NOW())

« previous php.general (#103410) next »