We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

[SOLVED]Invalid datetime value when I set to '1900-01-01'

exception 'PDOException' with message 'SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1900-01-01' for column 'creation_date' at row 1'

model->creation_date = '1900-01-01';

the column type is timestamp, database is mysql, thanks.



58.4k
Accepted
answer

@mia0606 unix timestamp seconds since Jan 01 1970. Try 2014-02-08 00:00:00