您能告诉我如何使用CAML查询将存储在SPList中的日期和时间作为DateTime字段与当前系统时间进行比较吗?
发布于 2010-06-27 15:52:49
与今天的日期进行比较:
<Where>
<Lt>
<FieldRef Name='Created'/>
<Value type='DateTime'><Today /></Value>
</Lt>
</Where>
比较今天的日期和时间
<Where>
<Lt>
<FieldRef Name='Created'/>
<Value type='DateTime' IncludeDateTime='TRUE'><Today /></Value>
</Lt>
</Where>
比较昨天的日期
<Where>
<Lt>
<FieldRef Name='Created'/>
<Value type='DateTime'><Today Offset='-1' /></Value>
</Lt>
</Where>
发布于 2012-07-19 03:31:46
要比较昨天的日期,应该是"OffsetDays“
<Where>
<Lt>
<FieldRef Name='Created'/>
<Value type='DateTime'><Today OffsetDays='-1' /></Value>
</Lt>
</Where>
https://stackoverflow.com/questions/3127860
复制