How to Compare Datetime Type in Access?

dennisho

New member
Local time
Today, 10:57
Joined
Apr 10, 2012
Messages
2
I have a Hotel database,
Table [Room]:
RoomID: Text,
Room_Checkin: Date/time,
Room_checkout: Date/time.
Example, I want to select rows which have room_checkout field > 4/10/2012'...
In SQL Server, I type these codes and it's successful...
SELECT * FROM ROOM WHERE ROOM_CHECKOUT > '04/10/2012
But in Access, with these codes , it doesn't execute exactly.... It don't compare with anything...
What do I do now... :mad:... Please help me :confused:
 
Last edited:
Write your query in the Query Design View.
Once working and if needed you can copy the SQL from the SQL view.
 
In Access queries you need to surround dates with the # symbol.
 

Users who are viewing this thread

Back
Top Bottom