views:

25

answers:

1

hi

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  A: 

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:

http://stackoverflow.com/questions/3724015/i-got-error-in-insert-to-database-access/3725449#3725449 http://stackoverflow.com/questions/3695144/help-with-access-date-query/3696278#3696278

Remou