Currently I have this:
var x = Convert.ToString(dateTimePicker2.Value.Subtract(dateTimePicker1.Value));
int xDays = Convert.ToInt32(x.Substring(0,1));
But it’s ugly and makes me unhappy on the inside (Also doesn’t work for 2 digit day spans, e.g. 15). Is there a better way to do this?
TimeSpan.Days returns an integer value representing the days component of the timespan value.