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
Why triggers are used in mysql?
Where are the persistent cookies stored on your computer?
How to get the http request in php?
What is artisan in php?
Why would we use === instead of ==?
What is a php web application?
How can we determine whether a variable is set?
How to get the total number of values in an array?
What is the difference between single-quoted and double-quoted strings in php?
Can php replace javascript?
What is __ invoke in php?
How to get a total number of elements used in the array?
How to take a substring from a given string in php?
Does apache use php?
Explain how to submit form without a submit button.