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 / Compare excel data wit...
Power Automate
Unanswered

Compare excel data with actual date

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    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

  • thomschi Profile Picture
    10 on at

    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
    8,003 Moderator on at

    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 at

    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

  • efialttes Profile Picture
    14,756 on at

    @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 at

    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.'.

     

  • thomschi Profile Picture
    10 on at

    Can anyone help me out here please.

    Thanks in advance.

  • efialttes Profile Picture
    14,756 on at

    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!

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard