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

Write a hello world program using variable?

955


Is php an api?

991


How to run the interactive php shell from the command line interface?

1109


What does a delimiter do in mysql?

1062


With a heredoc syntax, do I get variable substitution inside the heredoc contents?

1091


Tell me what is the actually used php version?

1029


How to test if a variable is an array?

1126


Explain object-oriented methodology in php?

1005


What is php and how do you use it?

1001


How to delete a file from the system?

1076


Which is the best web server?

970


What is the use of explode() function?

1069


in PHP for pdf which library used?

1018


What is a php certification?

993


What is urlencode and urldecode in php?

1135