I'm using views php to printing, and calculate some dates in my view.but when I try to print a date (06/01/2015) in the global php field it printed like: 16831 which is the node id
Value code:

return $load;

Out put code:

echo $value;

1 Answer 1



$load = $data->field_field_date_loading[0]['raw']['value'];
echo $load;

if you are using an end date as well you can get it with:

  • It doesn't work, nothing is printed
    – learner123
    Commented Jul 23, 2015 at 7:51
  • oh it works only if i use the code in out put code without passing the $value variable.
    – learner123
    Commented Jul 23, 2015 at 8:03
  • Works perfectly on a fresh install with drupal + views + views PHP. And you are suppose to put it in the output code.
    – DMAC
    Commented Jul 23, 2015 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.