php_begins Posted February 2, 2012 Share Posted February 2, 2012 I have a date field in the database table of this format 2012-02-08. Now I want to select fields from the database where date >= $currentdate. Do I have to do someting like $currentdate=time(); //Then convert it into YYYY-MM-DD format? Link to comment https://forums.phpfreaks.com/topic/256270-date-format/ Share on other sites More sharing options...
Pikachu2000 Posted February 2, 2012 Share Posted February 2, 2012 SELECT fields FROM table WHERE date >= CURDATE() MySQL has a bunch of native date/time functions HERE. Link to comment https://forums.phpfreaks.com/topic/256270-date-format/#findComment-1313743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.