Vivid Lust Posted April 1, 2011 Share Posted April 1, 2011 Hi all, How can I check in PHP if this date has already passed in the following format: 2012-12-12 Link to comment https://forums.phpfreaks.com/topic/232392-check-if-date-has-passed/ Share on other sites More sharing options...
Adam Posted April 1, 2011 Share Posted April 1, 2011 if ('2012-12-12' < date('Y-m-d')) { echo 'passed'; } else { echo 'not passed'; } More information on the date() function. Link to comment https://forums.phpfreaks.com/topic/232392-check-if-date-has-passed/#findComment-1195465 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.