This seems like a simple piece of code but nothing is getting removed.
I am trying to remove all records from a SharePoint list that fall on a specific date or between a date range. The following code does not remove any records.
RemoveIf(
Usage,
Created = DateValue("04/03/2023", "en-US")
)
Where have I gone wrong?
Hi @Hack-7,
Created is a DateTime column. When using the equals operator you are looking for records that were created at that exact moment in time (04/03/2023 12:00:00 AM). Please try the following adjustment:
RemoveIf(
Usage,
//Remove all records created on the 3rd of April 2023
Created >= Date(2023, 04, 03) && Created <= DateTime(2023, 04, 03, 23, 59, 59)
)
If this solves your question, would you be so kind as to accept it as a solution.
Thanks!