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

php sessions,logouts & the bloomin back button!
Hi All,

I've got a cms that members can log into. When they logout, the session is destroyed,

gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer a

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

Getting rid of quotes when printing data
Hi Guys, I use the filter_var FILTER_SANITIZE_STRING to filter the textarea input. The function esca

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

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