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

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

PHP/PKI
I am trying to set up a web application that uses pki. does anyone have a good tutorial to set this

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

PHP Login
Hey!
I got this shopcart code online, am trying to modify it but am getting an error when i try a

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

Problem executing bash script using shell_exec
Hi there,
I created a bash script file using following code to convert doc documents to pdf using

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