this is my code:
date_default_timezone_set('Asia/Kuala_Lumpur');
$date_join = $row['date_joined']; =produce 2012-09-03
$today = date("Y-m-d"); = produce 2014-08-29
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('H'.$a, **$xxx**);
how can i get date durations ($today - $date_join) in years like :
Date of services : 1.5 years
You can use
PHP strtotime() function
. Try like this..