refiking Posted February 23, 2010 Share Posted February 23, 2010 I am trying to check if the $biddate has already passed. The bid date is always today's date at 2:00 PM. What do I need to change here: $thetime = date("m/d/y h:i A"); $bidtime = date("m/d/y").' 02:00 PM'; if($thetime > $bidtime){ echo 'it is'; } echo $thetime . '<br>' . $bidtime; Link to comment https://forums.phpfreaks.com/topic/193089-help-with-a-date-function/ Share on other sites More sharing options...
veridicus Posted February 23, 2010 Share Posted February 23, 2010 I prefer strtotime... $bidtime = strtotime('today 2:00 PM'); if(time() > $bidtime){ echo 'it is'; } echo $thetime . '<br>' . $bidtime; Link to comment https://forums.phpfreaks.com/topic/193089-help-with-a-date-function/#findComment-1016851 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.