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 / Compare dates in excel
Power Automate
Answered

Compare dates in excel

(0) ShareShare
ReportReport
Posted on by 79

Hi all,

I have created a logic for date comparison, over here i just took 2 input and compared, and it's working , but i am not able to compare using excel sheet , my agenda is comparing dates from 2 excel sheets  and see if there are same , if there are not same , send an mail.

 

sabeoleonunes_0-1598856995719.png

Excel sheet 1

 

sabeoleonunes_1-1598857032027.png

Excel sheet 2

 

 

 

 

Categories:
  • manuelstgomes Profile Picture
    6,643 on at

    HI @sabeoleonunes 

     

    Please note that the dates come from Excel as numbers. Here's why.

     

    You can compare both numbers and see if they match or not, the same way you compare a string.

     

    Where are you stuck in the process?

     

    Can you please share the Power Automate and obfuscate anything private that you can't share so that I can have a better understanding of what you're trying to do and the issues.

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers
    Manuel

  • sabeoleonunes Profile Picture
    79 on at

    Hi @manuelstgomes 
    Sharing the flow which i have created to compare 2 excel columns dates

    sabeoleonunes_0-1598878487917.png

    sabeoleonunes_1-1598878530729.png

    sabeoleonunes_2-1598878574710.png

    sabeoleonunes_3-1598878591557.png

    formatDateTime(outputs('List_rows_present_in_a_table'),'yyyy-MM-dd')
     
     
    sabeoleonunes_0-1598878643547.png

     

     

    sabeoleonunes_1-1598878681506.png

    sabeoleonunes_2-1598878714231.png
    formatDateTime(outputs('List_rows_present_in_a_table_2'),'yyyy-MM-dd')
     
     
    sabeoleonunes_0-1598878749265.png

     

    sabeoleonunes_1-1598878838826.png

     

    sabeoleonunes_2-1598878856250.png

     

    sabeoleonunes_3-1598878893414.png

     

    sabeoleonunes_4-1598878924805.png


    If any pics are not clear , please let me know

     

     

     

  • Verified answer
    rsaikrishna Profile Picture
    3,703 on at

    @sabeoleonunes 

     

    As @manuelstgomes mentioned, when we read excel file from Power Automate, you will get the date values as Numbers. Handling dates from Excel in Power Automate, needs special tweaks. 

     

    You can read the blog for high level understanding:

    https://www.shanebart.com/ms-flow-excel-dates/

     

    // Format
    if(empty(<DATE TO CONVERT>),null,addDays('1899-12-30',int(<DATE TO CONVERT>),'yyyy-MM-dd'))
    
    // Example
    if(empty(item()?['Date']),null,addDays('1899-12-30',int(item()?['Date']),'yyyy-MM-dd'))

     

    The above formula is used to convert dates in Excel to proper dates in Power Automate.

     

    In your case, you may not need to convert to proper dates. You can just compare the date number values and send an email if they are not equal.

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

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
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard