I have a custom type Clinical Record
where some field is cli:date_created
. The type of this property is Date
.
When I try to set this field (with php) I get Argument of type "string" given but argument of type "\DateTime" was expected."
. But I am giving a Date and not a string.
'cli:date_created' => date('d/m/Y',strtotime($resultado[0]['fecha_alta'])),
What do I have to do in order to insert a date? Because I don't want to change the type from date to string in this field.