I am using a popular module called "Computed Field" in Drupal. I have used this field to make on the fly computations for several quote systems. I'm trying to use it to calculate the difference in time for a timesheet type of application. So a user enter in two times into CCK date fields (using PHP custom input g:i - ie 10:20 - year added automatically) but for some reason, I can't get the computed field to show any calculations.
Here is the most simple test example...still wont work
$start_value = $node->field_ts_train_start[0]['value'];
$end_value = $node->field_ts_train_end[0]['value'];
$node_field[0]['value'] = $end_value - $start_value;
From here, we pass the variable to $display. Can anyone see why this isn't working? I am open to any suggestions on how to work around the computed field, or to build custom functions using integers instead of UNIX time stamps..
Thanks.
Tim