Add 14 days to the current date Current date: Date in 2 weeks: Markup PageCurrent date: <asp:TextBox ID="TodayDt" runat="server" > Date in 2 weeks: <asp:TextBox ID="DaysAhead" runat="server" >
Code BehindTodayDt.Text = Date.Now.ToShortDateString DaysAhead.Text = Date.Now.AddDays(-Date.Now.DayOfWeek).AddDays(14).ToShortDateString
Substract 14 days from current date Current date: Date 2 weeks ago: Markup PageCurrent date: <asp:TextBox ID="TodayDt" runat="server" > Date 2 weeks ago: <asp:TextBox ID="PastDate" runat="server" >
Code BehindTodayDt.Text = Date.Now.ToShortDateString PastDate.Text = Date.Now.AddDays(-Date.Now.DayOfWeek).AddDays(-14).ToShortDateString