fareedreg Posted January 15, 2010 Share Posted January 15, 2010 In which format by default php accept date... I m comparing issue and return date but not getting exact conditon. I m using dd/mm/yyyy format. if($retdate<=$issto) { $_GET['txtreturn']=""; $_GET['txtreturn']=0; echo ($_GET['return']); } if my $retdate(04/02/2010) is greater then $issdate(30/01/2010) then also its enter into the condition WHY Link to comment https://forums.phpfreaks.com/topic/188632-date-format/ Share on other sites More sharing options...
lemmin Posted January 15, 2010 Share Posted January 15, 2010 What function are you referring too? Maybe you are looking for this information: http://us2.php.net/manual/en/function.date.php Link to comment https://forums.phpfreaks.com/topic/188632-date-format/#findComment-995857 Share on other sites More sharing options...
MatthewJ Posted January 15, 2010 Share Posted January 15, 2010 You're comparing strings... not dates try this if(strtotime($retdate)<=strtotime($issto)) { $_GET['txtreturn']=""; $_GET['txtreturn']=0; echo ($_GET['return']); } Link to comment https://forums.phpfreaks.com/topic/188632-date-format/#findComment-995858 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.