I want to calculate the numbers of days and nights between two dates. My date fields are in string types. I am trying to subtract like that but the sing "-" gives error. My code is like that.
(DateTime.Parse(dr["dtarihi"].ToString()).ToShortDateString()) - (DateTime.Parse(dr["dtarihi"].ToString()).ToShortDateString())