[英]Sharepoint CAML Date query
im getting different results based on the date i use to search on. 我会根据我用来搜索的日期得到不同的结果。
Here are the 3 records i want to display, their values for EVENTDATE, and ENDDATE are as follows 这是我要显示的3条记录,它们的EVENTDATE和ENDDATE值如下
1, 2009-08-11T00:00:00Z, 2009-08-14T23:59:59Z
2, 2009-08-11T00:00:00Z, 2009-08-14T23:59:59Z
3, 2009-08-14T20:00:00Z, 2009-08-14T22:00:00Z
When i search for a time between EventDate and EndDate 当我搜索EventDate和EndDate之间的时间时
- 2009-08-14T20:00:00Z, 2009-08-14T22:00:00Z
= i get rows 1,2
- 2009-08-14 T20:00:00Z, 2009-08-14 T22:00:00Z
= i get rows 3
Why does adding a space between the date and time give me a diff result? 为什么在日期和时间之间添加空格会给我差异结果? The entries into the list are the same, the return results dates are the exact same format.
列表中的条目相同,返回结果日期的格式完全相同。
Although the ISO 8601 standard specifies that a space to either side of the T is valid, I would guess that the CAML parser only accepts non spaces. 尽管ISO 8601标准指定T两侧的空格均有效,但我猜CAML解析器仅接受非空格。 And what you are seeing is a side effect.
而且您看到的是副作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.