function dateDiffernece($Date1, $Date2) { $fromDate = date('Y-n-j',strtotime($Date1)); $toDate = date('Y-n-j',strtotime($Date2)); $date_parts1=explode('-', $Date1); $date_parts2=explode('-', $Date2); $start_date=gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]); $end_date=gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]); return $end_date - $start_date; }
Thursday, January 20, 2011
PHP Difference Between Dates
In this tutorial we will find difference between two dates in PHP
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment