Calculate 2 dates
Posted: 2015-05-01 20:17
I have two date fields startdate and enddate. I have another integer field called daysremaining. Below is my hook I copied from another post on this forum but it does not work. I am trying to show days remaining between the two dates.
Code: Select all
function members_after_insert($data, $memberInfo, &$args){
$daysremaining = (strtotime($data['startdate'])- strtotime($data['enddate']))/86400;
return TRUE;