Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
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, 6294👍, 0💬
Popular Posts:
What is a delegate ? Delegate is a class that can hold a reference to a method or a function. Delega...
How do we access attributes using “XmlReader”? Below snippets shows the way to access attributes. Fi...
Can you explain what is “AutoPostBack” feature in ASP.NET ? If we want the control to automatically ...
What Is the Difference between Formal Parameters and Actual Parameters? - Oracle DBA FAQ - Creating ...
An application needs to load a library before it starts to run, how to code? One option is to use a ...