Select date from my db without seconds using PHP MySql

后端 未结 6 1921
生来不讨喜
生来不讨喜 2020-12-20 06:25

Well, I save the date\'s with minutes and second in my database.

And I want to check if the date from my db = to date today.

I read about this,

6条回答
  •  無奈伤痛
    2020-12-20 07:05

    try this code:

     DATE_FORMAT(STR_TO_DATE(t.datestring, '%d/%m/%Y'), '%Y-%m-%d')
    

提交回复
热议问题