[thelist] Querystring Problem Somewhere! Where - I dotn know.

Paul Backhouse paul.backhouse at 2cs.com
Mon Mar 4 07:23:01 CST 2002


Below is a query I am running.
I have people registering them selves for a product - the admin can log on
to a protected area to find out whose been registering etc...

I need to display the users who have registered on today's date ie:
04/03/2002 12:04:57
The code I'm using - I think is right, I've run it through the query tool in
access and it found the correct records and diplayed the amount of users
that have registered on today's date - but when I put it in a webpage -
nothing - the value is always 0 - I can't figure out why - can anyone else
see something I've done wrong?

<%
If Day(Date) < 9 Then
AddThis = 0
Else
AddThis = ""
End If

If Month(Date) < 9 Then
AddThis2 = 0
Else
AddThis2 = ""
End If

x1 = AddThis & Day(Date) & "/" & AddThis2 & Month(Date) & "/" & Year(Date) &
" 00:00:01"
x2 = AddThis & Day(Date) & "/" & AddThis2 & Month(Date) & "/" & Year(Date) &
" 23:59:59"

'Response.Write x1 & "<br>"
'Response.Write x2

strQuery2 = "SELECT Count(idate) AS Utotal FROM tblData WHERE idate BETWEEN
#"& x1 &"# AND #"& x2 &"#"
%>

<b>User Registered Today</b>: <%=objRS2("Utotal")%>

cheers

paul




More information about the thelist mailing list