I have a web application where the user will input 2 dates. A StartDate
and an EndDate
. Now I want to write it so that when StartDate
and EndDate
is selected to determine how many weeks there are and then to display the dates of those weeks for example if the user selects 01-11-2018 as the StartDate
and 31-12-2018 as the EndDate
then I want to display the following and keep in mind the Weeks are just for reference as to how it is going to look:
- Week 98 : 01 November 2018 - 03 November 2018
- Week 99 : 04 November 2018 - 10 November 2018
- Week 100 : 11 November 2018 - 17 November 2018
I already have the amount of weeks by using this previous post.
Now I just want to be able to to display each individual weeks Start and End date in all the weeks. I tried creating a list
with the weeks and then using a Foreach
to check the weeks added but this is not quite right. I am just searching for the most efficient way of accomplishing this goal.
Links also checked with similar problems are : Link1