[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

problem with dates

Posted on 2000-03-13
2
Medium Priority
?
231 Views
Last Modified: 2006-11-17
from a form I am taking a date input. Say the user enters some date,Now  I want to add 280 or(say some number) to the above date and get a new date which I wiil be showing to the user on submit.

Please advice how to go about doing this using php with example if possible.
0
Comment
Question by:qader99
[X]
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
2 Comments
 
LVL 8

Accepted Solution

by:
us111 earned 30 total points
ID: 2616895
<?
# Add 100 days
$MOREDAY = 100;

# date as Month-day-Year
$mydate="03-14-2000";
$olddate = $mydate;

$mydate = split("-", $mydate);
$newdate = date( "m-d-Y", mktime(0,0,0,$mydate[0],$mydate[1]+$MOREDAY,$mydate[2]) );

print "$olddate - $newdate";
?>
0
 

Author Comment

by:qader99
ID: 2619295
Thank you ver much
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

656 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