Week ends on Sunday. So today, Friday, has week ending date DateTime.Today.AddDays(2)
, correct?
And in general, if I calculate the number of days from the given date until the week ending date and assign it to DaysToWeekEnding
(number value), then
DateTime.Today.AddDays(DaysToWeekEnding)
, right?
Well I keep getting an error when trying to set the default value of a date field to the above. "No applicable method 'adddays' exists in type 'DateTime'. But if I replace DaysToWeekEnding with a literal number (e.g. 2), then the form builder accepts it as valid.
Please help me out of this loop, or let me know of another way to obtain a week ending date.