I have a date field in my Access database that stores the date/time 
in this format: 9/30/2004 3:30:08 PM

The, I have a script that needs to return all records inserted 
yesterday.  Right now, the script always returns "0" even when 
records have been inserted to the database.  Anyone know what I am 
doing wrong here?

Here is the script so far:
dtTempDate1 = DateAdd ("d", -1, Date)
mySQL1 = "SELECT Count(*) FROM tblProfiles WHERE fDateCreated = #" & 
dtTempDate1 & "# AND fType = 'Rep'"
Set objRS1 = Server.CreateObject("ADODB.Recordset")

Would it be better to use something like this:
fDateCreated BETWEEN dtTempDate1 AND Date()?

Thanks,
PW





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 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/
 



Reply via email to