$dos = explode("-", $date);
$dos2 = explode("-", $date2);
$dbetween = $dos['2']-$dos2['2'];
list($month, $day, $year) = split('[-]', $date);
list($month2, $day2, $year2) = split('[-]', $date2);
$dbetween = $day-$day2;
SELECT DATEDIFF(start_date,end_date) as number_days
sdsinc said:Keep it simple... Since you are extracting data from a DB (mySQL ?) use the built-in date functions.
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.htmlCode:SELECT DATEDIFF(start_date,end_date) as number_days
compuXP said:SDS - can you CONFIRM that I can use that function with 4.1.1? If so and it works I'll hand over some NP$.



