Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Number of Days between Two Dates
How can we know the number of days between two given dates in PHP?
✍: FYIcenter
Simple arithmetic:
<?php
$date1 = date('Y-m-d');
$date2 = '2006-07-01';
$days = (strtotime($date1) - strtotime($date2)) / (60
* 60 * 24);
$days = (int) $days;
echo "Number of days since '2006-07-01': $days";
?>
2007-02-27, 7391👍, 0💬
Popular Posts:
What are unadjusted function points and how is it calculated? Unadjusted function points = ILF + EIF...
How did you implement UML in your project ? PART II Implementation phase / Coding phase (Class diagr...
How can I enable session tracking for JSP pages if the browser has disabled cookies? We know that se...
What are the five levels in CMMI? There are five levels of the CMM. According to the SEI, Level 1 – ...
Explain in detail the fundamental of connection pooling? When a connection is opened first time a co...