Direct comparison of date/times can be problematic due to the the fractional part of the time. However, the index only contains the date part of the date-time at the moment. Dates are typically compared by range queries.
由于时间的小数部分,直接比较日期/时间可能会有问题。因此,索引只包含当前日期时间的日期部分。日期通常通过范围查询进行比较。
The query parser expects the date in ISO 8601 datetime format ‘yyyy-MM-dd’T’HH:mm:ss.sssZ’. Truncated forms of this date are also supported.
查询分析器要求日期采用ISO 8601日期时间格式“yyyy-MM-dd”T“HH:MM:ss.sssZ”。也支持此日期的截断形式。
You can also use the token TODAY to represent today’s date and NOW to represent now.
您还可以使用标记TODAY来表示今天的日期,NOW标识当前时间。
So to find date and datetime properties:
因此要查找日期和日期时间属性:
@cm\:modified:'2006-07-20T00:00:00.000Z'
To search for a node with a date property cm:created equal to today:
要搜索日期属性cm:created等于今天的节点:
@cm\:created:NOW