How To Calculate The Number Of Days Between Dates In PHP
erics, Posted November 9th, 2011 at 12:06:15pm
1 2 3 4 5 |
date_default_timezone_set('America/New_York'); $datetime1 = new DateTime('2009-10-31'); $datetime2 = new DateTime('now'); $interval = $datetime1->diff($datetime2); print $interval->format('%a days_elapsed'); |
Leave Your Comment
All fields marked with "*" are required.