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 Automate
Answered

Compare Dates

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow where I am comparing dates to see if one is in the future.  The format is MM/dd/yy. 

If %date% is not greater than %currentdate% then ask to re-enter to future date.

I can't get it to work properly.  It never accepts a date as in the future and always asks me to re-enter.  Is it because of the format?

 

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @Etignor1 

    Are you able to share screenshots of your flow?

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sure.  the first shot shows how I get the current date and format it.  The second shows the If statement.  The %Closingdate% is formatted the same as the current date format exactly.

     

    current date.pngcurr date greater than closing date.png

  • Verified answer
    andersjensenorg Profile Picture
    28 on at

    Hey Etignor1 🙂

     

    That's the wrong approach (you're trying to compare two text representations of DateTimes).

    What you should do instead (see below):
    1. Convert the ClosingDate text variable to DateTime. Remember to add the 00:00:00 AM to the Converting text. I called the output DateTimeClosingDate.
    2. Compare the CurrentDateTime (don't convert it to text) to the DateTime

    I've created the flow for you:
    DateTime.png
    PS. My Set variable (%ClosingDate%, 12/24/2022) was an example.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks buddy!!  I appreciate you!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 495

#3
Vish WR Profile Picture

Vish WR 429

Last 30 days Overall leaderboard