开发者

sharepoint : retrieve records using caml query on DateTime valued columns

开发者 https://www.devze.com 2023-01-21 15:25 出处:网络
I have to retrieve all the items from a list based on the condition that are modifi开发者_如何学JAVAed in the last 1 month. I am using the following Caml query but its not working.

I have to retrieve all the items from a list based on the condition that are modifi开发者_如何学JAVAed in the last 1 month. I am using the following Caml query but its not working.

<Query>
<Where>
<Geq>
<FieldRef Name="Modified" />
<Value Type="DateTime">[Today-30Day(s)]</Value>
</Geq>
</Where>
</Query>

Please help me regarding this issue.


Have you tried the OffsetDays attribute?

<Query>
    <Where>
        <Geq>
            <FieldRef Name="Modified" />
            <Value Type="DateTime">
                <Today OffsetDays="-30" />
            </Value>
        </Geq>
    </Where>
</Query>
0

精彩评论

暂无评论...
验证码 换一张
取 消