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

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
tom_riha
Super User
Super User

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 

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

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
Community Support
Community Support

@abm Thank you for always activating the forum.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,967)