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
How come the code works, but doesn’t for two-dimensional array of mine?
What is $row in php?
What are the advantages of indexes?
Write a program in php to check whether a number is prime or not?
What are the Formatting and Printing Strings available in PHP?
Which of the data type is compound datatype supported by PHP?
How do you identify independent and dependent variables in regression analysis?
How can we get the error when there is a problem to upload a file?
How to check whether a number is prime or not?
Does php use html?
can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.
Tell me what is the meaning of a final class and a final method?
What is static in php?
Tell me how can I display text with a php script?
Is php 5.6 secure?