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

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

How to write on database when a link is clicked?
Hi, I have a list of products in a gridview. When the link is clicked currently it takes to an ext

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

distinct rows
Hi
version 10.2.0.3

I have a query output something like the following

ID

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

line breaks in between fetched file names
Hi,

I have this code:
Code: <?php
if($dir = opendir('files')){
while (($f

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