elentz Posted November 14, 2007 Share Posted November 14, 2007 How can I take a date and add a set amount of days to it. What I am after is I have a CRM system that will generate the date of an invoice, I want to have a new field to add 10 days to that date. IE Invoice date 10-1-2007 and the Due date 10-11-2007. Thanks! Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted November 14, 2007 Share Posted November 14, 2007 $date = date('Y-m-d', strtotime("+10 days")); EDIT: If you want to add days to a specific date, then you can do this <?php $date = strtotime("2007-11-14"); $date = date('Y-m-d', strtotime("10 day", $date)); echo $date; ?> Quote Link to comment Share on other sites More sharing options...
elentz Posted November 15, 2007 Author Share Posted November 15, 2007 Would that work with a variable ? Instead of the static date? Thanks 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.