Automatically calculate date
Posted: 2013-02-24 00:25
I am new to PHP and appgini has proved to be excellent but I am struggling with an issue and I hoped someone could help me?
I have a date field called $LastVist. This is entered by the user. I have another date field called $NextVisit. I have a third field called $x631Status, this is an integer field with a value of 1 through to 6.
what I have been trying to do is multiply $x631Status by 30 then add this to $LastVisit to give me what the date of the $NextVisit should be but it is not displaying any date.
I have amended the tabl_dml.php file on the insert and edit lines as it showed in the support pages but still no luck. the code i found on google is below. I would be very grateful if you could help show me what I am doing wrong?
$data['NextVisit'] = strtotime($LastVisit ." + [$x631Status * 30]");
I have a date field called $LastVist. This is entered by the user. I have another date field called $NextVisit. I have a third field called $x631Status, this is an integer field with a value of 1 through to 6.
what I have been trying to do is multiply $x631Status by 30 then add this to $LastVisit to give me what the date of the $NextVisit should be but it is not displaying any date.
I have amended the tabl_dml.php file on the insert and edit lines as it showed in the support pages but still no luck. the code i found on google is below. I would be very grateful if you could help show me what I am doing wrong?
$data['NextVisit'] = strtotime($LastVisit ." + [$x631Status * 30]");