J
|
Jane 7/4/2007 |
ted, // split FirstDate to array $arr = db2time($values["FirstDate"]); // construct time $t = mktime($arr[3],$arr[4],$arr[5],$arr[1],$arr[2],$arr[0]); // construct new date $values["AnniversaryDate"] = date("Y-m-d",$t + 606024*365);
|
D
|
diaster author 7/4/2007 |
ted, you can do it using Before record added and Before record updated events on the Events tab/ Here is a sample code: where FirstDate and AnniversaryDate are your actual field names.
|
D
|
diaster author 7/4/2007 |
I am getting this message back |
J
|
Jane 7/5/2007 |
Ted, if($values["FirstDate"]) { // split FirstDate to array $arr = db2time($values["FirstDate"]); // construct time $t = mktime($arr[3],$arr[4],$arr[5],$arr[1],$arr[2],$arr[0]); // construct new date $values["AnniversaryDate"] = date("Y-m-d",$t + 606024*365); } |