Hi Carmella,
I would have you make sure the two dates are in the same month or not. If they are not in the same month then you can take the day from the DischargeDate.
You could do a formula like:
StringVar Admit_dt := ToText (Year ({table.AdmitDate}), 0, "", "") & "/" & ToText (Month ({table.AdmitDate}), 0, "", "");
StringVar Disch_dt := ToText (Year ({table.DischargeDate}), 0, "", "") & "/" & ToText (Month ({table.DischargeDate}), 0, "", "");
If Admit_dt <> Disch_dt Then
Day ({table.DischargeDate})
Else {table.DischargeDate} - {table.AdmitDate};
When you compare the month, I included the year in case someone has been admitted for over a year.
Good luck,
Brian