Will MySQL datetime format work with SQLite and PostgreSQL?

In MySQL, you enter dates ( datetime) in a format 2009-10-16 21:30:45. This makes it easy to insert time 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?

+3
source share
3 answers

SQLite uses several date formats ; PostgreSQL uses similar formats , etc.

Both understand YYYY-MM-DD HH: MM: SS.

+3
source

Yes for Postgres.

+2
source

Sqlite , , . iso-8601 , ( , , )

+1

Source: https://habr.com/ru/post/1729287/