Skip to main content

Notifications

Community site session details

Community site session details

Session Id : E/Mlc9ldE0LiJB9Pwo0n16
Power Automate - Building Flows
Unanswered

Compare excel data with actual date

Like (0) ShareShare
ReportReport
Posted on 17 Sep 2020 10:58:45 by 10

I have a list of all upcoming Teams live events with date and time within an excel sheet.
Excel links.png

The idea is to compare the current date with the ones in the excel sheet and if there is a scheduled meeting today the shortURL should be changed to the corresponding URL stated in the excel.

 

The changes for the shortURL works via a REST API perfectly. But unfortunately I'm not able to figure out the Excel part.

I'm able to list the rows present in a table and also to convert them into date/time format, but I'm not able to compare them with the actual date.

I guess it's pretty easy to accomplish for a pro.

Thanks in advance.

 

Screenshot Power Automate.png

  • efialttes Profile Picture
    14,756 on 09 Oct 2020 at 08:10:50
    Re: Compare excel data with actual date

    Hi!

    My suggestion is to add a dummy 'Compose' action block inside the 'Apply to each', just before the 'Condition' actual block, assign as its input WDL expression just for troubleshooting purposes

    item()?['Date']

     

    REexecute the flow, share 'Compose' value for the iteration that throws the error.

    THanx!

  • thomschi Profile Picture
    10 on 08 Oct 2020 at 10:15:32
    Re: Compare excel data with actual date

    Can anyone help me out here please.

    Thanks in advance.

  • thomschi Profile Picture
    10 on 18 Sep 2020 at 05:43:39
    Re: Compare excel data with actual date

    That's my expression within the condition rule

     

    addDays('1899-12-30', int(item()?['Date']), 'yyyy-MM-dd')

     

    And the today variable is this function

     

    utcNow('yyyy-MM-dd')

     

    And the error message is this

    Unable to process template language expressions for action 'Condition' at line '1' and column '10399': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

     

  • efialttes Profile Picture
    14,756 on 17 Sep 2020 at 14:00:27
    Re: Compare excel data with actual date

    @thomschi 

    Can you share the expression you are currently using inside your Condition rule?

    Also, is your Date excel column formated as Date or as Text?

     

    @fchopo is one of the most active members in this community, his two suggestions are related to my second question and are IMHO good insights.

     

    Hope this helps

  • thomschi Profile Picture
    10 on 17 Sep 2020 at 12:11:29
    Re: Compare excel data with actual date

    Please read my question. Date conversion is not my problem.

     

    2020-09-17 14_12_05-Run History _ Power Automate and 5 more pages - ServiceAccount - Microsoft​ Edge.png

  • fchopo Profile Picture
    7,968 Super User 2025 Season 1 on 17 Sep 2020 at 12:04:45
    Re: Compare excel data with actual date

    Hello @thomschi 

     

    The dates in Excel are stored as an integer value, that is the number of days since 12/31/1899, so you could the following expression:

    addDays('1899-12-31',int(item()?['Date']))

    Have a look at this post: https://www.shanebart.com/ms-flow-excel-dates/

    Hope it helps!

    Ferran 

  • thomschi Profile Picture
    10 on 17 Sep 2020 at 11:53:20
    Re: Compare excel data with actual date

    My question is how to compare the actual date with the value of Date within the Excel Data Object.

    The way I've created it, it's not working.

     

    Error message


    Unable to process template language expressions for action 'Condition' at line '1' and column '10399': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.



  • fchopo Profile Picture
    7,968 Super User 2025 Season 1 on 17 Sep 2020 at 11:14:46
    Re: Compare excel data with actual date

    Hello @thomschi 

    Could you share the expression you are using to convert the datetime from excel? You should take into account that the utcNow() function (used in the today variable initialization) will return day plus time, so you may format it using this expression:

    formatDateTime(utcNow(),'MM/dd/yyyy')

    Hope it helps!

    Ferran

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 87

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard