On Page_Load, I would like my web form to populate 1 textbox with a predefined date of today's date minus 14 days, i.e. 2 weeks ago.
I have the following so far:
Sub Page_Load(Src As Object, E As EventArgs)
If Not Page.IsPostBack Then
...
Dim dtmDate As DateTime = DateTime.Now
txtExceptionDate.Text = dtmDate.ToString("MM/dd/yyyy"
...
[/blue]
I have tried many, many combinations of trying to subtract 14 days from it but with no luck. I have tried other combinations as well. I posted the working code that simply displays today's date in the format I want it in, e.g. 10/27/2003
Your assistance would greatly be appreciated.
I have the following so far:
Sub Page_Load(Src As Object, E As EventArgs)
If Not Page.IsPostBack Then
...
Dim dtmDate As DateTime = DateTime.Now
txtExceptionDate.Text = dtmDate.ToString("MM/dd/yyyy"
...
[/blue]
I have tried many, many combinations of trying to subtract 14 days from it but with no luck. I have tried other combinations as well. I posted the working code that simply displays today's date in the format I want it in, e.g. 10/27/2003
Your assistance would greatly be appreciated.