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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.