我有一个表,其中有 8 列,其中 2 列是To
&From
这些具有日期时间的数据类型。我想在这两个字段上使用一些过滤器执行选择查询。
现在看下面的例子
Record X = From "5 May" to "18 May"
Filter 1: from "5 May" to "5 May" … x should show
Filter 2: from "10 May" to "10 May" … x should show
Filter 3: from "1 May" to "1 May" … x should NOT show
Filter 4: from "19 May" to "19 May" … x should NOT show
Filter 5: from "18 May" to "18 May" … x should show
Filter 6: From "4 May" to "17 May" …. X should show
Filter 7: From "4 May" to "18 May" …. X should show
Filter 8: From "4 May" to "19 May" …. X should show
Filter 9: From "5 May" to "17 May" …. X should show
Filter 10: From "5 May" to "18 May" …. X should show
Filter 11: From "5 May" to "19 May" …. X should show
Filter 12: From "2 May" to "3 May" …. X should NOT show
Filter 13: From "20 May" to "25 May" …. X should NOT show
所以基本上逻辑是如果过滤日期范围和数据库日期范围之间有任何共同的日期,那么记录应该显示在结果中。
你能帮我么?看到所有这些配置后,我很困惑。