codrgii Posted October 21, 2010 Share Posted October 21, 2010 How in PHP am i able to select a date from a table and compare that date with a period of 2 months? In sql we use something like select @2_months_later_date =dateadd(mm,2,getdate()) how would that be done in php? Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted October 21, 2010 Share Posted October 21, 2010 $two_months_later_date = strtotime('+2 months'); Quote Link to comment Share on other sites More sharing options...
schilly Posted October 21, 2010 Share Posted October 21, 2010 $two_months_later_date = strtotime('+2 months'); Nice. good tip. I always used mktime(). 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.