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

standard ALV application toolbar, into custom report....
HI,

I have a question regarding displaying standard ALV menu path and application toolbar

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched t

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

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

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