I thought I had an SQL count searching for a "Today" coded correctly, but I keep getting a 0 count back.
Using Access Database, date format at dd/mm/yyyy
I have this:
I then have this as the SQL:
Dim dteCurrent, dteMonth, dteDay, dteYear
dteCurrent = Date()
dteDay = Day(dteCurrent)
dteMonth = Month(dteCurrent)
dteYear = Year(dteCurrent)
MyDate = dteDay& "/" & dteMonth & "/" & dteYear
But I am getting is "0" where I am actually calling TodayApp is displayed on the page - when it actually should be a number over "0".
set rs1 = MyConn.execute("Select COUNT(*) as tpt from ppt_table where date_of_ppt="&MyDate&"")
if rs1.EOF = false then
TodayApp = rs1("tpt")
TodayApp = 0
set rs1 = Nothing