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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Date difference doesn'...
Power Automate
Answered

Date difference doesn't work right

(0) ShareShare
ReportReport
Posted on by 254

Hey guys, please help. I wrote a condition if current condition - 30 > Date then delete row (another words if current date - 30 > date then delete row).

ResaultOfDate.png

but it gives me wrong result: In my sp list date is 10/14/2022 in format "MM/dd/yyyy", so the condition should be false (because now is 10/17/2022, so we dont have diference in 30 days yet), which means dont delete yet, but condition is true, i dont know why.

Categories:
  • RobElliott Profile Picture
    10,539 Super User 2026 Season 2 on at

    @Aleksandra1 if you want current date minus 30 then your addDays expression should be addDays(utcNow(),-30)

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • Aleksandra1 Profile Picture
    254 on at

    I have just added minus, but it still doesn't work in right way

  • RobElliott Profile Picture
    10,539 Super User 2026 Season 2 on at

    make sure both sides of the condition are in the same date form,. I always do date comparisons with yyyy-MM-dd. The changes are that they are not the same in your condition.

     

    Rob
    Los Gallardos

  • Aleksandra1 Profile Picture
    254 on at

    So in my SP list DataFormat is 'MM/dd/yyy' how can I change it? Thanks

  • Verified answer
    RobElliott Profile Picture
    10,539 Super User 2026 Season 2 on at

    In the left hand part of your condition add the expression formatDateTime(addDays(utcNow(),-30),'yyyy-MM-dd') and in the right hand part of the condition add the expression formatDateTime(select your column, 'yyyy-MM-dd')

     

    Rob
    Los Gallardos

  • Kevine_Miala Profile Picture
    2 on at

    Hi, I have a problem.
    When I create a flow, I test it, the test works without problem. But if I modify this flow to add some actions, if I make the test, the test does not take into account the last actions I had added during the modification. What can I do to correct this error?
    Thanks in advance for your answer.

  • RobElliott Profile Picture
    10,539 Super User 2026 Season 2 on at

    @Kevine_Miala make sure you are are not clicking REsubmit because it will re-submit the flow with the actions that were there before. Always use the Test from the top right of the edit screen and it will take any new actions into account.

     

    Rob
    Los Gallardos

  • Aleksandra1 Profile Picture
    254 on at

    Okay I am trying to implement this way, noDynamicContent.png

    Maybe do you know why I don't see "Date" column in dynamic content? Thanks

  • Aleksandra1 Profile Picture
    254 on at

    Thank you very much!! Now it works!!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard