php, get an end date based on start date and number of months

Posted by mike on Stack Overflow See other posts from Stack Overflow or by mike
Published on 2010-04-01T18:07:50Z Indexed on 2010/04/01 18:13 UTC
Read the original article Hit count: 236

Filed under:

Hi!

I need to calculate an end date based on todays date and a number of months. For example, todays date 04/01/2010 and the number of months is 6. Are there any functions I can use to do some math that would return "10/01/2010"?

Also, I think it's important to note that I am storing the result in MySQL as a "DATETIME" so I guess I would have to do something with the time as well... ???

Thanks!

© Stack Overflow or respective owner

Related posts about php