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

PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,

This is my first time on your website and please excuse if I am asking silly que

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

need help in dynamic select menu in php
hi i have created a dynamic select menu using php. i have a problem in that which is when the user s

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following O

php file erros / need help please
Hello

Someone decoded a zend file for me.. after uploaded it on ftp i get some errors, i trye

please hep to get values from a table row
can anyone tel me how I can select and get data from one row by pressing an Edit button in that row

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

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