How to query data whose DATETIME field value is between some time?

  • Thread starter Thread starter Jeff Yang
  • Start date Start date
J

Jeff Yang

I found the following SQL is wrong(STARTTIME's filed type is DATETIME):
SELECT * FROM TABLE1 WHERE STARTTIME BETWEEN '2003-11-12 11:00:00' AND
'2003-11-12 12:00:00'
can you tell me the right SQL?thanks!
 
Use # as the delimiter:
.... WHERE STARTTIME BETWEEN #2003-11-12 11:00:00# AND #2003-11-12 12:00:00#
 
Back
Top