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

Reditecting pages based on logic
Newbie here, apologies in advance!

I am trying to use the header function to forward one of a

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

modifying a property of an object from a different class
I have 2 classes:
- Math
- Distance

in my math class, I have this line:
$distance =

radio button reamains checked
Hello i'm trying to keep the state off my radio buttons so it shows which ones where clicked after t

order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

Custom CMS
This is a big custom CMS script I'd like to develop and would like some help atleast figuring out wh

how to use two buttons with php
hi i have one form. there are three fields which are to be filled by the user. and then there are tw

Amatuer requiring assistance
Beginner and amateur in need of assistance

My Site - (Spare Parts for Domestic Appliances)

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