You need to make sure that the formatting of what you are looking for is
the same format of the field. (hopefully I said that right). So, try
this.... It may be different depending on the flavor of your database.....
"SELECT COUNT (*) FROM post WHERE FormatDateTime(postdate,'MM/DD/YYYY')=#"
& Date() & "#"
Soren
rickstahr <[EMAIL PROTECTED]>
01/11/2005 06:52 PM
Please respond to active-server-pages
To: [email protected]
cc:
Subject: [ASP] Count Today's Posts
While we're on a roll here...
I'd like to count today's posts - I've used
"SELECT COUNT (*) FROM post WHERE postdate='" & Date() & "'"
"SELECT COUNT (*) FROM post WHERE postdate=#" & Date() & "#"
"SELECT COUNT (*) FROM post WHERE postdate='#" & Date() & "#'"
then I tried output these ways
GetTodaysPosts=conn.execute(SQL)
response.write GetTodaysPosts(0)
SELECT COUNT (*) FROM post as todaysposts WHERE postdate='#" & Date()
& "#'"
response.write todaysposts
It's either 0 or blank. Dare I ask for help again?
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [email protected]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
[Non-text portions of this message have been removed]
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [email protected]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/