Jump to content

Calculate days between two dates


roeyhaim

Recommended Posts

Sorry about the spam but i found the function  :D

Can any one tell me how to edit it, that i can insert in format  dd/mm/yyyy ???

 

function dateDiff($start, $end) {

$start_ts = strtotime($start);

$end_ts = strtotime($end);

$diff = $end_ts - $start_ts;

return round($diff / 86400);

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.