I have a list of all upcoming Teams live events with date and time within an excel sheet.
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.
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!
Can anyone help me out here please.
Thanks in advance.
That's my expression within the condition rule
addDays('1899-12-30', int(item()?['Date']), 'yyyy-MM-dd')
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.'.
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
Please read my question. Date conversion is not my problem.
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
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.'.
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
stampcoin
87
Michael E. Gernaey
70
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1