timmah1 Posted March 17, 2009 Share Posted March 17, 2009 How would I go about adding 1 Year to a date pulled from the database? Here is what I have $setup = date("F j, Y", strtotime($a['setup'])); $expires = date("F j, Y ", strtotime($setup '+1 year')); But I get an error. Thanks in advance Quote Link to comment Share on other sites More sharing options...
.josh Posted March 17, 2009 Share Posted March 17, 2009 example #3 in the manual entry for date shows you how to do that. It even gives +1 year as the example. Doesn't hurt to actually read the manual, you know. Quote Link to comment Share on other sites More sharing options...
timmah1 Posted March 17, 2009 Author Share Posted March 17, 2009 If I was using mktime(), then that would be helpful to me, but I'm not. Am I just overlooking something? $expires = date("Y-m-d", strtotime($a['setup']) . " +1 Year"); Quote Link to comment Share on other sites More sharing options...
.josh Posted March 17, 2009 Share Posted March 17, 2009 why don't you try doing it like the manual suggests. I think they know how to do it better than you. 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.