In MySQL you enter dates (datetime
field) in the format 2009-10-16 21:30:45
. Which makes it simple to insert times into the database.
$date = date('Y-m-d H:i:s', $timestamp);
Will this format work with SQLite and PostgreSQL? If not, what format do they use?