I am trying to write a Caml Query to get only today's list items and then later copy it into the new list.
I am using the batch method to copy data from source list to destination.
source list gets updated daily with new list items.
Current Caml query which still gets all the data and not today's:
$Query = New-Object Microsoft.SharePoint.Client.CamlQuery $Query.ViewXml = @" <View Scope='RecursiveAll'> <Query> <Eq> <FieldRef Name='Date' Ascending='TRUE'/> <Value IncludeTimeValue='False' Type='DateTime'><Today /></Value> # Did not work on true </Eq> </Query> <RowLimit Paged="TRUE">5</RowLimit> </View> "@
IncludeTimeValue='False' as well as
IncludeTimeValue='True' both are giving the same results.
What should be my Caml query to get only today's list items?
Ask me questions for more details if needed.