How can we know the number of days between two given dates
using PHP?
How can we know the number of days between two given dates
using MySQL?
Answer Posted / vipul dalwala
php
-------------------------------------------------------
$noofdays = ceil(((strtotime($endDate) - strtotime
($startDate)) / (60*60*24)))
Mysql
-------------------------------------------------------
SELECT ((UNIX_TIMESTAMP('2007-10-01') - UNIX_TIMESTAMP
('2007-09-04'))/(60*60*24)) AS dateDiff;
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
How many escape sequences are recognized in double-quoted strings?
What is c++ polymorphism?
Is php a web server?
What is singleton design pattern in php?
How big is nvarchar max?
How to get best php developer Experience in Php with Sugar CRM / VTiger.
What is composer install?
What is difference Between PHP 5 and 7?
Will react hooks replace redux?
Name some of the functions in php.
What is session in PHP. How to remove data from a session?
Differentiate between php5 and php7?
How to create a table using php?
What is difference between sql and php?
How break and continue while loop in php?