How to select records between a date to another date given a DateTime field in a table.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
SELECT *
FROM tbl
WHERE myDate BETWEEN #date one# AND #date two#;
回答2:
select *
from blah
where DatetimeField between '22/02/2009 09:00:00.000' and '23/05/2009 10:30:00.000'
Depending on the country setting for the login, the month/day may need to be swapped around.