I hope someone can help me with this one.
I have a page where there are 2 dropdownlist menus where you select a topic and if the topic is approved. Once those two criterias are met I display the results on a datagrid. example----
<aspataGrid ID="dg" Runat="server" Visible="False" Cellpadding="4" Autogeneratecolumns="false" allowSorting="true" OnSortCommand="dg_SortCommand">
<columns>
<asp:boundcolumn headertext="REQUESTED COMPLITED DATE" Datafield="datesubmit" DataFormatString="{0:d}" SortExpression="datesubmit" />
<asp:BoundColumn HeaderText="PRODUCT NAME" DataField="txtProductName" SortExpression="txtproductname" />
<asp:BoundColumn HeaderText="DEPARTMENT" DataField="deptname" SortExpression="deptname" />
<asp:HyperLinkColumn HeaderText="VIEW DETAILS" DataNavigateUrlField="reqid" DataNavigateUrlFormatString="CscReqDetails.aspx?reqid={0}"
Text="View Details" HeaderStyle-CssClass="RedLink"></asp:HyperLinkColumn>
</columns>
</aspataGrid>
As you can see the datagrid displays the date the form was submitted the product name, the department where the form was submitted from and a link to view the form result.
On the original form I have a radiobutton list that holds the value of 30 days 60 days or 90 days. This constitude the time the topic needs to be evaluated by.
(radiolist from original form submittion)
<asp:radiobuttonlist id="Time" Runat="server" RepeatDirection="Vertical">
<asp:ListItem Value="Standard (within 90 days)"></asp:ListItem>
<asp:ListItem Value="Escalated (within 60 days)"></asp:ListItem>
<asp:ListItem Value="Urgent (within 30 days)"></asp:ListItem>
</asp:radiobuttonlist>
I have now been asked to display on the datagrid the date the form was submitted + whatever the value was on the radiobutton selection. lets say I submitted the form on 5/1/2004 and i chose that the evaluation of my form needs to be completed on 30 days then I need to display 6/1/2004 as the date on the datagrid.
Problem is I tried addmonths function and cant get it to work. I am hoping someone can help me come up with a function for this. All help will be appreciated.
I tried the following but I keep getting only the date the form was submitted not the date + the completed date.
Sub GetDate()
Dim datesubmit As Date
Dim rdlTime As String
If rdlTime = "Standard (within 90 days)" Then
datesubmit = datesubmit.AddMonths(3)
End If
If rdlTime = "Escalated (within 60 days)" Then
datesubmit = datesubmit.AddMonths(2)
End If
If rdlTime = "Urgent (within 30 days)" Then
datesubmit = datesubmit.AddMonths(1)
Else
datesubmit = datesubmit
End If
End Sub
Thanks !
I have a page where there are 2 dropdownlist menus where you select a topic and if the topic is approved. Once those two criterias are met I display the results on a datagrid. example----
<aspataGrid ID="dg" Runat="server" Visible="False" Cellpadding="4" Autogeneratecolumns="false" allowSorting="true" OnSortCommand="dg_SortCommand">
<columns>
<asp:boundcolumn headertext="REQUESTED COMPLITED DATE" Datafield="datesubmit" DataFormatString="{0:d}" SortExpression="datesubmit" />
<asp:BoundColumn HeaderText="PRODUCT NAME" DataField="txtProductName" SortExpression="txtproductname" />
<asp:BoundColumn HeaderText="DEPARTMENT" DataField="deptname" SortExpression="deptname" />
<asp:HyperLinkColumn HeaderText="VIEW DETAILS" DataNavigateUrlField="reqid" DataNavigateUrlFormatString="CscReqDetails.aspx?reqid={0}"
Text="View Details" HeaderStyle-CssClass="RedLink"></asp:HyperLinkColumn>
</columns>
</aspataGrid>
As you can see the datagrid displays the date the form was submitted the product name, the department where the form was submitted from and a link to view the form result.
On the original form I have a radiobutton list that holds the value of 30 days 60 days or 90 days. This constitude the time the topic needs to be evaluated by.
(radiolist from original form submittion)
<asp:radiobuttonlist id="Time" Runat="server" RepeatDirection="Vertical">
<asp:ListItem Value="Standard (within 90 days)"></asp:ListItem>
<asp:ListItem Value="Escalated (within 60 days)"></asp:ListItem>
<asp:ListItem Value="Urgent (within 30 days)"></asp:ListItem>
</asp:radiobuttonlist>
I have now been asked to display on the datagrid the date the form was submitted + whatever the value was on the radiobutton selection. lets say I submitted the form on 5/1/2004 and i chose that the evaluation of my form needs to be completed on 30 days then I need to display 6/1/2004 as the date on the datagrid.
Problem is I tried addmonths function and cant get it to work. I am hoping someone can help me come up with a function for this. All help will be appreciated.
I tried the following but I keep getting only the date the form was submitted not the date + the completed date.
Sub GetDate()
Dim datesubmit As Date
Dim rdlTime As String
If rdlTime = "Standard (within 90 days)" Then
datesubmit = datesubmit.AddMonths(3)
End If
If rdlTime = "Escalated (within 60 days)" Then
datesubmit = datesubmit.AddMonths(2)
End If
If rdlTime = "Urgent (within 30 days)" Then
datesubmit = datesubmit.AddMonths(1)
Else
datesubmit = datesubmit
End If
End Sub
Thanks !