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

PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

[Need Help] php timing issues
I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorad

TabControl Inside ListView Not Editing
Hello everybodyI have a ListView on my page. Inside the ListView I put a TabControl, cuz I want to p

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a

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