alwoodman Posted January 23, 2011 Share Posted January 23, 2011 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 Link to comment https://forums.phpfreaks.com/topic/225390-select-todays-records-from-datetime-field/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 23, 2011 Share Posted January 23, 2011 SELECT * FROM table WHERE DATE(date_time_value) = curdate() ORDER BY date_time_value Link to comment https://forums.phpfreaks.com/topic/225390-select-todays-records-from-datetime-field/#findComment-1163994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.