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

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

line breaks in between fetched file names
Hi,

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

a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header error

I'm do not know php &

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

cyrillic string conversion question
Hello,

First time here...

I would like to know if there is a way to convert a

BAPI BBP_INB_DELIVERY_CREATE - material number missing in delivery
Hi Experts,

I was able to successfully create an Inbound delivery with reference to a PO

PHP friend keyword equivalent
is there a PHP equivalent for the C++ friend keyword?

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