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

help with php
It's not displaying or pulling anything out of the database.


Code: <html><

how to make database item unique
Hey guys,

is it possible to do this:

I have the database item $title being pulled for

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

IDOC error
Hi, When i send IDOC from ECC system to MII there is no problem ECC side, i says message sent succe

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.

Legal Issues for SAP ERP o ERP in general
Hi experts,

Can someone please help me finding some documentation about legal issues tha

Validating time
Hi Guys

what do you think of the following approach to validate a 24hour time:

http://

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