Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Flow was working but it fails because of the date format?

(0) ShareShare
ReportReport
Posted on by 4

I have a Flow tied to a spreadsheet and am trying to convert the date, "Reminder Date" below, to match utcNow(). The expression below has worked. Today, Flow indicates the expression failed and I receive the error message beneath it.

 

FormatDateTime(addDays('1900-01-01',add(int(items('Apply_to_each')?['Reminder Date']),-2)),'MM-dd')

 

Error: Unable to process template language expressions for action 'Condition' at line '1' and column '10245': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

Please tell me how to correct this error. Thanks!

 

Solved. The window where the expression is entered is small so I typed it in MS Word. For some reason Word turned the apostrophe at the end of '1900-01-01' into a single quotation mark. 😩This is the only place where it occurred. When I copied and pasted the expression into Flow and ran it, I got the error message. I corrected the error and the Flow worked perfectly.

  • trekingalong Profile Picture
    4 on at
    Re: Flow was working but it fails because of the date format?

    This Flow sent an email to someone based on a date in a spreadsheet. The spreadsheet is located on OneDrive for Business. I upload a copy of it into Teams and created a new Flow. The Flow recognized the expression above and it ran successfully. No emails were sent, however.

  • trekingalong Profile Picture
    4 on at
    Re: Flow was working but it fails because of the date format?

    Good evening,

     

    I have not been able to find a work around. Could you suggest an expression? 

  • kokane Profile Picture
    on at
    Re: Flow was working but it fails because of the date format?

    Hello

    Function 'int' was invoked with a parameter that is not valid, so you can use other functions to instead of it.

    Please check the function reference.

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#date-and-time-functions

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow