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 = "";
$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

unoconv doc convert to pdf code prob
PHP/5.3.1

Hi. I am trying to use this code to convert docs to .pdf utilizing unoconv. Howe

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob

Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

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