web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Remove item from Share...
Power Automate
Unanswered

Remove item from SharePoint if the item with date column is less than today

(0) ShareShare
ReportReport
Posted on by 47

Below is my SharePoint list.

Screenshot 2024-03-19 151658.png

Below is my flow.

murtaza5_0-1710833720922.png

 

1. But when I run today (19th March 2024), the flow deleted both item with title A and B. Supposedly item with title A only. What did I do wrong?

2. Which one is better expression? My SharePoint local time is GMT+8.

 

Date lt '@{utcNow()}'

 

 

 

Date lt '@{addMinutes(utcNow(), 480)}'

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-yetonggu-msft Profile Picture
    on at

    Hi @murtaza5 ,

    Please try this expression:

    Date lt '@{utcNow('yyyy-MM-dd')}'

    Because if you don't format the utcNow time format, he'll output like this:

    vyetonggumsft_0-1710837227074.png

    A date string with a time.

    vyetonggumsft_1-1710837279759.png

    However, if the SharePoint date column does not have a time format, it defaults to 0:00:00 on the current day.

    3/19/2024 defaults to 2024-03-19T00:00:00.0000000Z, so item B will be deleted.

     

    Best Regards,

    Sunshine Gu

     

  • murtaza5 Profile Picture
    47 on at

    Hi @v-yetonggu-msft,

     

    Do I need to change the Date column type to single text?

     

    Regards,

    Taza

  • v-yetonggu-msft Profile Picture
    on at

    Hi @murtaza5 ï¼Œ

    You don't need to, it's still in 'Date and Time' format.

     

    Best Regards,

    Sunshine Gu

  • murtaza5 Profile Picture
    47 on at

    Hi @v-yetonggu-msft, I need to use the expression below and it works. Thanks!

     

    utcNow('MM-dd-yyyy')

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard