Page 1 of 1

Calculate 2 dates

Posted: 2015-05-01 20:17
by jay007
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;

Re: Calculate 2 dates

Posted: 2015-05-21 05:53
by Satya Kavala
Hello Jay007,
Please check your PM.