Unanswered: count numbers of records untill a specific date
Hope someone can help me out here.
I have a Access 2003 database which I access through ASP website.
I want to count the numbers of records I had one year earlier then the present date. My code looks like this
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.CursorType = adOpenStatic
objRS.ActiveConnection = Con
objRS.Open="Select * FROM NEWSTUDENTS_2011 WHERE
STUDENT_status < '2' and entry_date < Date()-365"
number_student_2011 = objRS.RecordCount
I guess my use of date format is terrible wrong - but hours of searching and trying different alternatives - haven't worked so far. :-(
The recordcount I recieve is too big ....
whats wrong ..?
thanks for any response