Filter by datetime MYSQL formatting

前端 未结 2 1322
抹茶落季
抹茶落季 2020-12-30 04:02

I have a Mysql Table that is used for a log file on the that table there is a field called \'log_date\' And it stores the date in the following format( %Y-%m-%d %H:%i.%s ).O

2条回答
  •  庸人自扰
    2020-12-30 04:46

    You can try with that..

      WHERE DATE_FORMAT(AUCTION_DATE, '%Y%m%d') >= DATE_FORMAT('2013/5/18', '%Y%m%d')
    

    You can also get today date using now() function.

提交回复
热议问题