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

styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those.

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

PHP Search Issue
Hi, I am using the following code to search and return flights from a database. The user searches by

Request for tunning the below query
Hi,

Can any one help me on the below query while improving the performance,

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET websit

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

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