cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beanybone
Helper I
Helper I

date checking excel

Hi there, I'm looking for help in a flow which is checking a spreadsheet for a date, if it finds a date it should then send an email. 

I have 3 compose actions as follows but I keep erroring out in compose 2. 

 

Flow3.PNG

 

Compose 2 - addDays('1899-12-30',int(outputs('Compose')),'dd-MM-yyyy')

Compose 3 - formatDateTime(utcNow(),'dd-MM-yyyy')
 

Grateful for any help

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User III
Super User III

Hi @beanybone 

Your compose 2 expression looks good to me.

 

Please have a look at my video.  

 

Check your run history and check the first compose output what it's returned. 

 

Is your Excel column is  formatted to  Date type?

 

Power Automate - Dealing Excel Date in Power Automate - YouTube

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

7 REPLIES 7
tom_riha
Super User II
Super User II

Hello @beanybone ,

it would be helpful if you shared the error message you get.

I don't understand what you're trying to achieve in the 'Compose 2' action, addDay() expression expects parameters (date, number of days to add, format). It seems you're giving it parameters (date, date converted to int?, format), I'm not sure if conversion from date to int will work.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Hi @tom_riha thanks for reaching out!

 

So this is the error. Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '15338': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

Essentially what I'm trying to achieve is a flow that looks at a date in an excel file, if its today then send an email

 

Previously community support set me up with the compose wording this way 

abm
Super User III
Super User III

Hi @beanybone 

Your compose 2 expression looks good to me.

 

Please have a look at my video.  

 

Check your run history and check the first compose output what it's returned. 

 

Is your Excel column is  formatted to  Date type?

 

Power Automate - Dealing Excel Date in Power Automate - YouTube

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

That's the problem I mentioned, you can't convert date into an integer.

You don't need the addDays() expression at all, you just need to convert the date from the Excel file into the same format ('dd-MM-yyyy') for the comparison. You'll do that in a similar way you're using in the 3rd Compose action.

formatDateTime(<Date of Visitor>,'dd-MM-yyyy')

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

hi @tom_riha cant get this to work but solved the issue with my original wording, just noticed the date wasn't pulling in in the first compose so rebuilt and now working thanks for your help!

I just tried it and it didn't work for me either 🙂 The addDays() expression is the right way to process dates from Excel.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
askondo
Microsoft
Microsoft

@abm Thank you for always activating the forum.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,134)