Advertisement

02.23.2007 at 12:16PM PST, ID: 22409984
[x]
Attachment Details

help with variables in ASP specific to dates

Asked by jaw1971 in Active Server Pages (ASP)

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
[+][-]02.23.2007 at 12:32PM PST, ID: 18599022

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.23.2007 at 12:32PM PST, ID: 18599023

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: fritz_the_blank
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.23.2007 at 12:43PM PST, ID: 18599102

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2007 at 12:46PM PST, ID: 18599122

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02.26.2007 at 06:31AM PST, ID: 18609246

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 08:29AM PST, ID: 18626379

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32