Mysql strip time component from datetime

前端 未结 5 989
夕颜
夕颜 2020-12-03 00:20

I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert \'2008-11-05 14:30:00\' to \'2008-11-05\'

Currently i a

5条回答
  •  广开言路
    2020-12-03 00:50

    Just a simple way of doing it date("d F Y",strtotime($row['date'])) where $row['date'] comes from your query

提交回复
热议问题