Jump to content

[SOLVED] DATETIME FIELD DATE_FORMAT problem


samona

Recommended Posts

Hi all,

 

I have a problem with the following query.  If I run it, it outputs all the records including the ones from previous dates.  All I want is to display the records for the current date. I don't know what I'm doing wrong. 

 

SELECT *FROM Table_1 WHERE DATE_FORMAT(Current_Date, '%Y %m %d' ) = DATE_FORMAT(CURDATE(), '%Y %m %d' ) 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.