Set a datetime field configured as date-only
Assuming field_profile_geburtsdatum is configured as a singular date-only datetime field, the following are all equivalent in the Field API (in order of my preferred usage):

$user-&gt;field_profile_geburtsdatum = '1999-12-31';
$user-&gt;field_profile_geburtsdatum-&gt;value = '1999-12-31';
$user-&gt;field_profile_geburtsdatum-&gt;set(0, '1999-12-31');
$user-&gt;set('field_profile_geburtsdatum', ['1999-12-31']);


The value you set should be a string in the DATETIME_DATE_STORAGE_FORMAT, which is 'Y-m-d', and not a DrupalDateTime object.  That is used internally by the field type.