0

Can anyone help me with CAML query where items are created or modified today.

Trying below where I am excluding one specific item and getting modified item today but its not working:

<View><Query><Where><And><Neq><FieldRef Name='ID' /><Value Type='Counter'>412</Value></Neq><Eq><FieldRef Name='Modified' /><Value Type='DateTime'><Today/></Value></Eq></Neq></And></Where></Query><RowLimit>500</RowLimit></View>

1 Answer 1

2

Try using this CAML query:

<View>
    <Query>
        <Where>
            <And>
                <Neq><FieldRef Name='ID' /><Value Type='Counter'>412</Value></Neq>
                <Or>
                    <Eq><FieldRef Name='Modified' /><Value Type='DateTime'><Today/></Value></Eq>
                    <Eq><FieldRef Name='Created' /><Value Type='DateTime'><Today/></Value></Eq>
                </Or>
            </And>
        </Where>
    </Query>
    <RowLimit>500</RowLimit>
</View>

Documentation: Query schema in CAML

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.