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

comparing tables across databases sql refinement ideas required
Hi all

Via pl/sql I need to ensure that data between tables in different databases match

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

DirectoryIterator and Hacked Website
Hi Everyone.

My problem:
Some one has been sneaking in to my website hidden Iframes. I've

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le

Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha

Connection Timeout
I'm using xmii 12.0

I'm calling a transaction as a web service from a windows application

Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

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