On 28 Feb, 09:39, "Marc Gravell" <marc.grav...@gmail.comwrote:
* * * * * * DateTime start = new DateTime(2008,02,11), end = new
DateTime(2008,02,25);
* * * * * * double weeks = end.Subtract(start).TotalDays / 7;
You might want to use Math.Floor() or Math.Ceiling() to round up or down....
Marc
thanks for your replies! great help.
Marc, could i do the following..
DateTime start = new DateTime(variable name), end = new
DateTime(variable name);
double weeks = end.Subtract(start).TotalDays / 7;
because those dates are selected at the users command. then using
Math.Floor() to round up?