Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we know the number of days between two given dates
using PHP?

Answer Posted / rameshfromind

There is one function for gregoriantojd that means convert
to gregorian calendar date to julian date count.

Below the example for counting days between two date.

<?
$startDate = '01-01-2008' // mm-dd-yyyy/yy
$endDate = '01-30-2008' // mm-dd-yyyy/yy
echo gregoriantojd($endDate) - $gregoriantojd($startDate);
?

// OUTPUT

29

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain mysql_error().

951


What is php destruct?

936


Tell me what is mean by an associative array?

1026


What are php expressions?

1057


What backslash character will match whitespace?

1015


What is php full form?

999


Why do we use namespace in php?

899


Is python better than php?

972


What is the difference between associative array and indexed array?

1023


How can we know the total number of elements of Array?

1009


What is the actually used php version?

1042


Why and where do we use htaccess?

999


Tell me what is htaccess?

882


What are the three classes of errors that can occur in php?

996


How to do single and multi line comment in php?

970