1

I am rewriting the output a view block with a Global(PHP) field from the module Views PHP, and one of the fields I am rewriting is a Date field.

The value for the field is : 2015 - 08:30 to 09:30

I am looping through the fields and simply printing them to see the output:

foreach ($data->field_field_item_timespot as $timeEntry) { $time = $timeEntry['raw']['value']; print $time; }

This is the output: 2015-01-01 08:30:00

The issue that I am having is that it is only printing the start-date of the field, when I need both start-date & end-date. I am specifying the Date field to display start and end date values, and it does in the view, but not inside the Global(PHP).

Any ideas how to get the end-date value within Global(PHP)?

1 Answer 1

2

$time = $timeEntry['raw']['value'] == Start Date

$time = $timeEntry['raw']['value2']== End Date

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.