In a C# windows form based application. I used two dateTime pickers,one for From and another for To.
if a employee selecting his leave from may 30 in dateTime picker1 and selecting june 2 in datetime picker2, that makes 4 days of leave.
My question is how can i findout how many days he took leave in may and how many days he took leave in june?
Update I know this, and stuck further
DateTime start = dateTimePicker1.Value.Date;
DateTime end = dateTimePicker2.Value.Date;
int a = int.Parse(Convert.ToInt32(end.Subtract(start).Days).ToString());