Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
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, 6224👍, 0💬
Popular Posts:
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
what are the advantages of hosting WCF Services in IIS as compared to self hosting? There are two ma...
How do I debug thread ? This window is only seen when the program is running in debug mode. In windo...