Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张带有开始日期和结束日期的休假请求表。我想显示仅在今天匹配的开始日期和结束日期之间的记录。有没有办法只在一个日期范围内显示今天的记录?
然后我需要在明天的单独 sql 查询中做同样的事情。
SELECT * FROM MyTable WHERE Date() >= StartDate AND Date() =< EndDate AND DateField = Date()
这将为您提供日期为今天日期且介于开始日期和结束日期字段之间的所有记录。显然,它只适用于您运行查询的日期。
您可以使用 BETWEEN 运算符来清理它(即 Date() BETWEEN StartDate 和 EndDate),但我对此并不肯定。
I have some different objects that all of them have a integer field called Place. Is there a way to sort out this list without knowing what is the actual object? I mean just accessing
Place