I am working in ASP creating a web report that pulls data from an oracle table. I am using VB script to create a couple of variables to use.
I have a combo box with several selections, one of them is MONTHLY. When the user selects MONTHLY I want the data to come back but I do not want the 'DATES' they selected to show- I only want the MONTH to appear in the datagrid along with the data. So if they selected 1/2/2007-1/31/2007 with the calendar I want the results to show
JANUARY 11111 22222 34%
I have started an IF statement but I am lost as to how to break out the month now.
Here is what I have- MONTHLY does not work-- because I do not know what to put in my ( ) between the TO_CHAR.....
IF rollup.SelectedItem.Value = "Daily" then
Drange1 = "'" & sdate & " - " & edate & "'"
Else If Rollup.Selecteditem.value = "Monthly" then
Drange1 = "To_Char(" & sdate & " - " & edate & ",'MONTH')"
Else If Rollup.SelectedItem.Value=
"Date Range" Then
Drange1= "'" & sdate & " - " & edate & "'"
END IF
Thanks
Start Free Trial