Okay, so I got this probably very easy problem, but only find answers for the opposite approach.
I have this mysql column: timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
when i try to:
select * from table where timestamp > 1440586108
i get the following warning: Incorrect datetime value '1440586108' for column timestamp at row 1
How should i do it properly?
Timestamp has format yyyy-mm-dd H:i:s
See the docs
What you need is FROM_UNIXTIME()
Select * from table where timestamp > FROM_UNIXTIME(1440586108)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments