问题
i have in my access fields MyDate
and myTime
.
MyDate in format: 16/09/2010 00:00:00
MyTime in format: 16/09/2010 04:27:00
i need to search between date 01/01/2010 and time 12:50:00 - and - date 12/11/2010 time 01:34:00
which query i need to write ?
thank's in advance
回答1:
The delimiter in Access is hash (#). I hope that you are using a date-time fields, and not two separate fields (columns).
SELECT MyDate
FROM tbl
WHERE MyDate Between #2/5/2006 14:7:0# And #11/18/2006 17:28:15#
You will find additional notes here on date formats (ANSI, US) and concatenating date & time:
Error when inserting a record into MS Access MS Access 2007: date query
来源:https://stackoverflow.com/questions/3725177/how-to-search-between-2-dates-and-times-in-access