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 are traits?

788


Write down the code for save an uploaded file using php?

532


Why do we need session?

616


What is the use of header() function in PHP? What the Limitation of HEADER()?

647


Is php easier than node?

600






Do you know what's the difference between __sleep and __wakeup?

605


Tell me how is it possible to return a value from a function?

642


What is the use of count() function in php?

600


Where is the functions php in wordpress?

592


Where do I run php code?

601


Tell me what is the use of "ksort" in php?

622


How to list all values of submitted fields?

626


Which will check if a function exists?

689


Explain me difference between mysql_connect and mysql_pconnect?

632


What is scope of variable in php?

665