2005-04-20 21:54:00 2000-09-10 04:30:00 2000-09-15 00:00:00[code lang="php"]'; echo sql_date_format("10 September 2000 4:30 AM").'
'; echo sql_date_format("next Thursday").'
'; function sql_date_format($value) { // Very simple function to prepare a time/date value to // input into a MySQL database. Can accept both string // values as well as timestamps. // This function is used in my database class available // at http://www.micahcarrick.com/2005/04/19/php-mysql-database-class/ if (gettype($value) == 'string') $value = strtotime($value); return date('Y-m-d H:i:s', $value); } ?>[/code]



