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
Write a hello world program using variable?
Is php an api?
How to run the interactive php shell from the command line interface?
What does a delimiter do in mysql?
With a heredoc syntax, do I get variable substitution inside the heredoc contents?
Tell me what is the actually used php version?
How to test if a variable is an array?
Explain object-oriented methodology in php?
What is php and how do you use it?
How to delete a file from the system?
Which is the best web server?
What is the use of explode() function?
in PHP for pdf which library used?
What is a php certification?
What is urlencode and urldecode in php?