error in comparing time in sql vb

syntax error?

Page 1 of 1

0 Replies - 869 Views - Last Post: 20 May 2008 - 12:49 AM Rate Topic: -----

#1 cr38  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-May 08

error in comparing time in sql vb

Posted 20 May 2008 - 12:49 AM

sql_select = "SELECT examID, examName FROM tbExam where dateAvailable >= " & date() & " and  timeAvailable >= " & FormatDateTime(now(),vbshorttime) & ""



Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'dateAvailable >= 5/20/2008 and timeAvailable >= 15:37'.

the comparing of date works fine but the comparing in the time is making the syntax error.
have already tried using shorttime and long time but its still not working
i'm using microsoft access 2000 format by the way for my database

Is This A Good Question/Topic? 0
  • +

Page 1 of 1