Welcome Guest, Not a member yet? Register   Sign In
how to get date duration?
#1

[eluser]yudahebat[/eluser]
how to make function to get duration day from date1 to date2 on CI?
for example date1=2009-06-15 and date2=2009-07-05 so the duration day is 20 day
#2

[eluser]Thorpe Obazee[/eluser]
Code:
function datediff($a, $b)
{
   return date('j', strtotime($a) - strtotime($b));
}




Theme © iAndrew 2016 - Forum software by © MyBB