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
Can php run without server?
Tell me what does $_env means?
What is rest api in php?
Where sessions stored in PHP?
What is string and its function?
What is difference between echo and print in php?
What is factory pattern in php?
How to create a public static method in PHP?
How do you define a constant in php?
How we get ip address of client, previous reference page etc?
How to open a file for reading?
How to send email using php script?
Does PHP 5 support exceptions? State Whether True or False?
How to remove values saved in the current session?
What are different types of errors available in Php?