psycho quilla
March 23rd, 2009, 09:16 AM
Hi,
I am working on a genealogy website and want to display on the home page a "on the day" function. I have worked out different methods to extract the date and month from current time with which to query the access database. Here I have become hoplessly stuck, this is the cose I am using:
DIM PartDay, PartMonth, ThisDay
PartDay = DatePart("d", Date())
PartMonth = DatePart("m", Date())
ThisDay = PartDay & PartMonth
Set objRS = Server.CreateObject("ADODB.Recordset")
MySQL = "SELECT * from Diary where Date Like '#" & ThisDay & "#'"
objRS.Open MySQL, objConn, 1, 3
i have also tried another variation querying the database with 23/03 but still no joy.
Please can somebody please tell me how to query a database date
Thank you
I am working on a genealogy website and want to display on the home page a "on the day" function. I have worked out different methods to extract the date and month from current time with which to query the access database. Here I have become hoplessly stuck, this is the cose I am using:
DIM PartDay, PartMonth, ThisDay
PartDay = DatePart("d", Date())
PartMonth = DatePart("m", Date())
ThisDay = PartDay & PartMonth
Set objRS = Server.CreateObject("ADODB.Recordset")
MySQL = "SELECT * from Diary where Date Like '#" & ThisDay & "#'"
objRS.Open MySQL, objConn, 1, 3
i have also tried another variation querying the database with 23/03 but still no joy.
Please can somebody please tell me how to query a database date
Thank you