Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

SharePoint RemoveIf by Date

(0) ShareShare
ReportReport
Posted on by 212

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?

Categories:
  • Hack-7 Profile Picture
    Hack-7 212 on at
    Re: SharePoint RemoveIf by Date

    @LaurensM Ha!  I missed that completely.  Cheers

  • Verified answer
    LaurensM Profile Picture
    LaurensM 12,510 on at
    Re: SharePoint RemoveIf by Date

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard