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

UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the

what business processes?
Hi,

A general question. What business processes (like OTC - Order to Cach, P2P, R2R etc)

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

recrawling
Can anyone suggest me how may i know a page is updated before it is being downloaded, so that i can

parsing error
can anyone explain this syntax error:

Parse error: syntax error, unexpected T_IF

The e

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

Simple Question
I know this is a simple question, that if I knew what it was technically called i could probably loo

this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my

Executing an exe
Hi. I have some bizarre problem with exec (other any other method) to launch exe's. I am making a ga

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