DateTime dt1= DateTime.Now; // select Date 1 DateTime dt2= DateTime.Now.AddDays(20); // select Date 2 TimeSpan ts = dt2 - dt1; // Substract Date 2 to Date 1 Textbox1.Text= ts.Days; // Get The Total Days Difference
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)