cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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 blog

Power Automate Video Tutorials

View solution in original post

7 REPLIES 7
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. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

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 

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 blog

Power 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. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

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

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]
Microsoft
Microsoft

@abm Thank you for always activating the forum.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (17,768)