phpisawesome Posted November 18, 2008 Share Posted November 18, 2008 I'm trying to do a query in php...how do I check if something is 2 weeks using the php date function? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 18, 2008 Share Posted November 18, 2008 2 weeks = 60 seconds * 60 minutes * 24 hours * 14 days = 1209600 seconds so go <?php $date1 = date("U",DATESTAMP FORM HERE); $date2 = date("U",DATESTAMPE FORM HERE); if($date-$date1 < 1209600){ #within 2 weeks } else{ #not within 2 weeks } ?> Quote Link to comment 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.