Programmatically get the date field value All I want to do is get the value out of a date field in Drupal 8, but they have done an expert job of making this impossible. The error I get is that 'dateTimeObject' is protected so I have no access to it.
Try this out -

$schedule_start = $form_state-&gt;getValue('field_start')-&gt;format("Y-m-d H:i:s");
$schedule_end = $form_state-&gt;getValue('field_end')-&gt;format("Y-m-d H:i:s");


Provide your own desirable format.