$expirationdate[0] = 4/15/2005
$startdate[0] = 3/1/2005
I would like to determine the number of days between the above dates.
My approach:
$startdate = strtotime($star tdate[0]); // change to a string
$expirationdate = strtotime($expi rationdate[0]);
$delta = $expirationdate - $startdate; // $delta = 1110175200
How do I convert $delta to only number of days? // number of days should
equal 45 days
Do I need to convert the dates to strings to subtract them?
Thanks!
Ken
$startdate[0] = 3/1/2005
I would like to determine the number of days between the above dates.
My approach:
$startdate = strtotime($star tdate[0]); // change to a string
$expirationdate = strtotime($expi rationdate[0]);
$delta = $expirationdate - $startdate; // $delta = 1110175200
How do I convert $delta to only number of days? // number of days should
equal 45 days
Do I need to convert the dates to strings to subtract them?
Thanks!
Ken
Comment