Your error seems to be generated from your next code section:
SqlFunctions.StringConvert((double)p.PrescriptionDate.Value.Month).TrimStart();
and especially the usage of:
p.PrescriptionDate.Value.Month
So you should modify this code section by using:
DateName("month", p.PrescriptionDate).Trim()