i have a date in the future and i want to find out how many weeks away this is.
`TimeSpan.TotalDays` is already declared `double`.
Tim Robinson
2010-03-07 17:40:06
Eep, sorry then.
Joey
2010-03-07 18:18:40
+1
A:
I think you'd be best getting the no of days and dividing that by 7
DateTime start = DateTime.Now;
DateTime end = DateTime.Now.AddDays(21);
double noOfDays = (end - start).TotalDays;
double noOfWeeks = noOfDays / 7;
Fermin
2010-03-07 17:39:43