Re: [PHP] date for mysql
On Fri, Oct 17, 2003 at 03:28:50PM +0200, Diana Castillo wrote: : : how can I format the current date and time so that I can insert it into a : mysql table with an insert query? That depends on the column type of your MySQL table. Is it a DATETIME? DATE? TIMESTAMP? TIME? Or just a YEAR? http://www.mysql.com/doc/en/Date_and_time_types.html Once you know the column type and its format, you can use PHP's date() function to do the correcting formatting for MySQL. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] date for mysql[Scanned]
Diana, Have a look at the getdate() function. This will return an associative array of a time which you can then use to create the date in the format you wish. Regards, Michael Egan -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED] Sent: 17 October 2003 14:29 To: [EMAIL PROTECTED] Subject: [PHP] date for mysql[Scanned] how can I format the current date and time so that I can insert it into a mysql table with an insert query? -- 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
[PHP] date for mysql
how can I format the current date and time so that I can insert it into a mysql table with an insert query? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php