I have 2 SQL tables (A & B) with dates in the format DD/MM/YYYY and time, for example 01/03/2012 00:00:00. In my VB.net application I am looking to count the number of records in table A which have a date less than the one in table B. I have no problem getting the dates from the database. I have extracted the date in table B and stored this in the program. Im just not sure how to compare the dates within the SQL query.
In short what I am trying to do is:
"select count(records) as totalRecords from table A where date < " & dateBvariable & ""
Any Help appreciated
try