Mysql Incorrect datetime value when doing select on timestamp with unixtime value -


okay, got easy problem, find answers opposite approach.

i have mysql column: timestamp timestamp not null default current_timestamp on update current_timestamp,

when try to:

select * table timestamp > 1440586108

i following warning: incorrect datetime value '1440586108' column timestamp @ row 1

how should properly?

timestamp has format yyyy-mm-dd h:i:s

see the docs

what need from_unixtime()

select * table timestamp > from_unixtime(1440586108) 

Comments