Jump to content

Select todays records from DateTime field


alwoodman

Recommended Posts

Im trying to select all the records that were created today irrespective of time from a Datetime field. This is what i have so far but it only pulls yesterdays.

 

SELECT * FROM table WHERE date_time_value < curdate() and date_time_value> DATE_ADD(CURDATE(), INTERVAL -1 day) ORDER BY date_time_value ASC

 

thanks in advance

 

Lee

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.