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
How to open a file for reading?
How be the result set of mysql handled in php?
Define urlencode() and urldecode() used in php?
What is the difference between rest and soap?
What php framework does wordpress use?
What is php stack?
Why does php start with variables?
Can we use session in mvc?
How to check your php installation?
What is the difference between Session and Cookie?
A process can run only in the background. State Whether True or False?
What are the functions of string?
What is abstract class php?
How to write a program to make chess?
What is the best way to test the strpos() return value in php?