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

Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.

At the minute I:

check for the orig

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

convert static html data into dynamic
hi all

i need to convert a website which has static above 2000 articles into dynamic and add

listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t

Help with explandable category tree
I have the below query:

SELECT l1.id as lev1_id,l2.id as lev2_id,l3.id as lev3_id,l1.categ

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

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