English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

example: 3/22/2006 , 4/10/2007 basically tell me the number of days between any two dates entered by me

2007-03-22 19:49:02 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

function daysInRange ($date1, $date2) {
return (strtotime($date2) - strtotime($date1)) / (24*60*60);
}

This function will return the number of days between two dates in their textual representation. function daysInRange ('3/22/2006', '4/10/2007') should return 384...

2007-03-23 15:28:15 · answer #1 · answered by NC 7 · 2 0

$digest_date = "2007-03-15";
$date_diff = date("d",strtotime(date('y-m-d'))) - date("d",strtotime($digest_date));

or try this link

http://au2.php.net/date

2007-03-23 03:36:24 · answer #2 · answered by satheesh k 1 · 2 0

yes you can find readymade scripts like this
at
http://php.net/

2007-03-23 05:02:15 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers