我有一个包含 2 个日期(时间戳)的字段集合,并且想计算日期之间的差异。但我无法让它工作..有什么帮助吗?
Computed code:
$eind = $entity_field->field_data_field_eind_field_collection_item_entity_type[0]'timestamp'];
$begin = $entity_field->field_data_field_begin_field_collection_item_entity_type[0]['timestamp'];
$entity_field[0]['value'] = $eind - $begin;
Display code:
$display_output = $entity_field[0]['value'];