Comparing timestamp with date variable (MySQL and PHP)

后端 未结 3 769
逝去的感伤
逝去的感伤 2021-01-19 23:01

Any help is highly appreciated.

Say I have a MySQL database with a timestamp column with the value \"1305590400\", how can I compare that with a PHP variable of say

3条回答
  •  情书的邮戳
    2021-01-19 23:19

    You could always convert the timestamp to a formatted date.

    SELECT FROM_UNIXTIME(1358871753,'%Y %D %M');
    

    Produces: 2013 22nd January

提交回复
热议问题