Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


date + 1 day`

Posted on 2013-05-12
Medium Priority
Last Modified: 2013-05-13
date written in this format
year month day

want date + 1 day
Question by:rgb192
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 58

Assisted Solution

Gary earned 800 total points
ID: 39160092
echo date('Y-m-d', strtotime('+1 day', strtotime($date)));

Open in new window

LVL 35

Assisted Solution

gr8gonzo earned 400 total points
ID: 39160119
You can eliminate the second strtotime() call by just adding 86,400 seconds (the total # of seconds in a day):

$tomorrow = date("Y-m-d",strtotime("2013-05-13")+86400);
LVL 58

Assisted Solution

Gary earned 800 total points
ID: 39160121
That will not work for daylight savings
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 400 total points
ID: 39160148
One more time... It's all in this article that I keep encouraging you to read!


<?php // RAY_temp_rgb192.php
ini_set('display_errors', TRUE);
ini_set('log_errors',     TRUE);

$date = '2013-05-13';
$plus = date('Y-m-d', strtotime($date . ' + 1 DAY'));
var_dump($date, $plus);

Open in new window

Best regards (and please read that article!!), ~Ray

Accepted Solution

kshna earned 400 total points
ID: 39160633
you need to use mktime function

Author Closing Comment

ID: 39162433
thanks all and double thanks to Gary about daylight savings

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question