Add days to current date from MySQL with PHP -


i have fixed date mysql

startdate = 07/03/2011 

i wanted add 60 days on top date have enddate.

$startdate = $result['startdate']; $enddate = ??? + strtotime("+60 days"); echo $enddate; 

from research, know has strtotime, sites come across based start date current workstation's time. date fixed , entered prior running , getting enddate.

help? in advance!

in addition php solutions others providing, can create enddate right inside of mysql , save of trouble:

select startdate, date_add(startdate, interval 60 day) enddate table;  -- or months (not same thing) select startdate, date_add(startdate, interval 2 month) enddate table; 

relevant documentation here...


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -