How to calculate days from variable date?


Posted on 16th Feb 2014 07:03 pm by admin

This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:

Code: <?php
$mydate = "";
Did you know?Explore Trending and Topic pages for more stories like this.
$daysaway = 400;
$startdate = "5/5/2005";

//I need how to get the date that was 400 days ago

print "$mydate was $daysaway days from $startdate.";
?>
No comments posted yet

Your Answer:

Login to answer
223 Like 50 Dislike
Previous forums Next forums
Other forums

New Search Engine
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of t

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

Basic Question about Threading and PHP...
I have a page that I am working on and it is taking several hours to process. The basics of what th

Table Control
Hi Guru's,

I've created a Module pool program, which contains the Table Control.

Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"

Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if

* Gridview and Detailsview in UpdatePanel, insert mode problem
I have a GridView and DetailsView working together. When a record from Gridview is selected, Detail

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash