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
What is difference between readonly and constant?
How to get the number of characters in a string?
Tell me how do you define a constant?
Can you extend a final defined class?
What are properties in php?
What is strlen php?
How to pad an array with the same value multiple times?
What is php simple definition?
What is default session time and path in PHP. How to change it?
How to get a total number of elements used in the array?
Is php the same as html?
What is the use of friend function in php?
What is session and Cokkies . How it works . tell some thing about Session_id()
How to execute an sql query?
How to run the interactive php shell from the command line interface?