How to get formatted date string from a DateTimeItem object
A date field has two properties, value to store the date in UTC and date, a computed field returning a DrupalDateTime object, on which you can use the methods getTimestamp() or format():

// get unix timestamp
$timestamp = $node-&gt;field_date-&gt;date-&gt;getTimestamp();
// get a formatted date
$date_formatted = $node-&gt;field_date-&gt;date-&gt;format('Y-m-d H:i:s');


For a date range field:

// formatted start date
$start_date_formatted = $node-&gt;field_date-&gt;start_date-&gt;format('Y-m-d H:i:s');
// formatted end date
$end_date_formatted = $node-&gt;field_date-&gt;end_date-&gt;format('Y-m-d H:i:s');