This topic is locked

Calculation

1/15/2009 5:41:53 PM
PHPRunner General questions
B
bobby123 authorDevClub member

Hi
Hope someone can help me, what I am trying to do on the Before Record Add Event is Add 2 fields together and Divide the result by 24 then store the result in a field called days.
I have tried the following but is doesn't work
$values["Days"] = $values["Daily Break"]+$values["Weekly Break"]/24;
I think the above is incorrect
Thanks

Bobby123

T
thesofa 1/15/2009

Hi

Hope someone can help me, what I am trying to do on the Before Record Add Event is Add 2 fields together and Divide the result by 24 then store the result in a field called days.
I have tried the following but is doesn't work
$values["Days"] = $values["Daily Break"]+$values["Weekly Break"]/24;
I think the above is incorrect
Thanks

Bobby123



try

$values["Days"] = ($values["Daily Break"]+$values["Weekly Break"])/24;
B
bobby123 authorDevClub member 1/15/2009

Thanks thesofa
That did it
Bobby