If you need to store both date and time, there are several ways to accomplish this. MySQL has built-in date/timestamp options, but those long strings would need to be converted for be human readable.
The option I use most is telling PHP what format I want to use and entering it into the database as a variable character (VARCHAR) field. $Today = date((Y-m-d H:i),mktime()); Returns: 2003-12-15 18:20 See the PHP help file for mktime() and date() Jim www.websitemanagers.net ----- Original Message ----- From: "Cesar Aracena" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 15, 2003 5:23 PM Subject: [PHP] PHP and MySQL date | Hi all, | | I'm making a site and need some tables from wich I can extract date, time | and/or date/time later with PHP and I neved had very clear the way the | possible formats work with each other so my question is what is the best (or | recommended) method to store dates and/or times in a MySQL DB for PHP to | work later? | | Thanks in advanced, | ___________________________ | Cesar L. Aracena | Commercial Manager / Developer | ICAAM Web Solutions | 2K GROUP | Neuquen, Argentina | Tel: +54.299.4774532 | Cel: +54.299.6356688 | E-mail: [EMAIL PROTECTED] | | -- | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php