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

str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Help to integrate whois Domain Details to website
Hi,

can i know is their any php script r methods to add domain details to my website.

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

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

add 20 000 to the rowcnt
Hi ...
I need to add 20 000 to the row count but just cant find a way to do this i am new to php

quick basic question, hopefully not dumb
I don't know how to search for this, so forgive me if it's been covered...

I often see an exa

Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place

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