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

What is move_uploaded_file in php?

973


What is php mainly used for?

978


Is it more secure to use cookies to transfer session ids?

959


How escape single quotes php?

964


Do you know what are traits?

998


What are regular expressions in programming?

897


What is a php certification?

982


Explain the importance of the function htmlentities.

985


What advance thing in php7?

949


Which function(s) in PHP computes the difference of arrays?

977


What is php full form?

1050


Explain whether it is possible to share a single instance of a memcache between multiple php projects?

962


What is a stored procedure in mysql?

1083


Where is my php ini file?

1062


Is rent a variable cost?

935