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...

write code to find the date difference b/w two given date
using PHP not MYSQL function?

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 ?    9 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can php run without server?

990


Tell me what does $_env means?

913


What is rest api in php?

902


Where sessions stored in PHP?

928


What is string and its function?

921


What is difference between echo and print in php?

876


What is factory pattern in php?

876


How to create a public static method in PHP?

979


How do you define a constant in php?

995


How we get ip address of client, previous reference page etc?

920


How to open a file for reading?

969


How to send email using php script?

993


Does PHP 5 support exceptions? State Whether True or False?

1056


How to remove values saved in the current session?

970


What are different types of errors available in Php?

883