You can directly assign null value to Date field in that case,
prescription[/cref5_appointmentdate/] =Appointment.Attributes.Contains(/cref5_date/) ? Appointment.GetAttributeValue<DateTime>(/cref5_date/) : null ;
It will work.
Hope this helps, please mark this response as verified if it answers your question.
Regards,
Prince