close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Date Format

Thread began 10/25/2010 9:37 am by nmabey414064 | Last modified 10/29/2010 10:57 am by nmabey414064 | 1827 views | 9 replies

nmabey414064

I think it is through a query string...


I Query FD (FirstDay) and LD (LastDays) on the previous page like this (I set <%session.lcid=1033%> on the top of the page, so that the date is created in the american way, otherwise the graph is not displayed):

dim LD
dim FD
dim todaydate
todaydate = Day(date)
if RSD > todaydate then
FD = DateSerial(Year(Date), Month(Date) -2, RSD)
LD = DateSerial(Year(Date), Month(Date) -1, RSD -1)
else
FD = DateSerial(Year(Date), Month(Date) -1, RSD)
LD = DateSerial(Year(Date), Month(Date) -0, RSD -1)
end if

and then I pass them through a link and the url to the next page that displays the graph.
The url look then like this:
.../protected2.asp?Site_ID=5&Site_Name=Site%202&AM=4361&FD=9/15/2010&LD=10/14/2010

The code for the graph on the page displaying it is:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="940" height="200">
<param name="movie" value="DynamicWebCharts/open-flash-chart.swf?data=DynamicWebCharts/Data/protected2_dataparser1.asp?Site_ID=<%=Request.QueryString("Site_ID")%>%26FD=<%=Request.QueryString("FD")%>%26LD=<%=Request.QueryString("LD")%>" />
<param name="quality" value="high" />
<embed src="DynamicWebCharts/open-flash-chart.swf?data=DynamicWebCharts/Data/protected2_dataparser1.asp?Site_ID=<%=Request.QueryString("Site_ID")%>%26FD=<%=Request.QueryString("FD")%>%26LD=<%=Request.QueryString("LD")%>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="940" height="200"></embed>
</object>

The code of the data page looks like this:

<%
Dim MM_Stats14_STRING
MM_Stats14_STRING = "dsn=Login;"
%>
<%
Dim WADWCStats__ParamSite_ID
WADWCStats__ParamSite_ID = "-1"
If (Request.QueryString("Site_ID") <> "") Then
WADWCStats__ParamSite_ID = Request.QueryString("Site_ID")
End If

Dim WADWCStats__ParamFistDay
WADWCStats__ParamFistDay = "-1"
If (Request.QueryString("FD") <> "") Then
WADWCStats__ParamFistDay = Request.QueryString("FD")
End If

Dim WADWCStats__ParamLastDay
WADWCStats__ParamLastDay = "-1"
If (Request.QueryString("LD") <> "") Then
WADWCStats__ParamLastDay = Request.QueryString("LD")
End If

Dim WADWCStats
Dim WADWCStats_cmd
Dim WADWCStats_numRows

Set WADWCStats_cmd = Server.CreateObject ("ADODB.Command")
WADWCStats_cmd.ActiveConnection = MM_Stats14_STRING
WADWCStats_cmd.CommandText = "SELECT Stats_Date AS XLABEL, Minutes AS YVALUE FROM Stats WHERE Site_ID = " & Request.QueryString("Site_ID") & " AND Stats_Date >= #" & Request.QueryString("FD") & "# AND Stats_Date <= #" & Request.QueryString("LD") & "# ORDER BY Stats_Date"
WADWCStats_cmd.Prepared = true

Set WADWCStats = WADWCStats_cmd.Execute
WADWCStats_numRows = 0
%>


Does that make sense, does this helps?

If I don't create the date in the american way and sent it in the uk way the graph doesn't display so I think I have to change somehow the way the graph wants to receive the date, but where?


Thanks very much for the help

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...