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

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

Page Reload
I am having issues getting a page to reload after I submit data to a database. This form should inp

UDP server recvfrom() always returns -1? :(
Hello all,
I am getting a very strange error in my code :( I am writing a server application in C

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

chat
hello i'm amir i need a chat source code in asp.net 2.0 without Ajax. anybody can help me?

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

socket makes browser hang...
I have a socket server, and I am having a problem at the moment...

A browser sends a http hea

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