web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Birthday Automation

(0) ShareShare
ReportReport
Posted on by 10

Hi can someone help me out, as getting error as "Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'."

attached screenshot for reference.

 

1)

MImran_2-1688627737635.png

2)

MImran_3-1688627871148.png

 

What I actually selected the format in Condition

 

MImran_0-1688627613569.png

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @MImran ,

     

    Could you share the expression you are using in the condition action?

     

    Best Regards,

    Wearsky

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You are trying to convert an array (a list of items) to a date and that is not allowed. What you need to do is convert a single string.

    We would need to see the exact expressions of both of your formatDateTime() expressions to provide more specific guidance.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution.
    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • MImran Profile Picture
    10 on at

    thank you for the respond, here the screenshots.

     

    for the 1st one is formatDateTime(outputs('compose'),'MM/dd'

    MImran_0-1688681173173.png

     

    2nd one is formatDateTime(utcNow(),'MM/dd')

     

    MImran_1-1688681230897.png

     

  • MImran Profile Picture
    10 on at

    thank you for the respond, here the screenshots.

     

    for the 1st one is

    formatDateTime(outputs('compose'),'MM/dd'

    MImran_2-1688681433302.png

     

     

    2nd one is

    formatDateTime(utcNow(),'MM/dd')

     

    MImran_3-1688681433308.png

     

     

  • v-xiaochen-msft Profile Picture
    on at

    Hi @MImran ,

     

    Thanks for the clarify.

    The value of the compose is wrong.

    It seems that you have a date column in SharePoint list, and you want to compare it with utcnow(), right?

    If my guess is right, please use items('Apply_to_each')?['DateColumnName'] here.

    vxiaochenmsft_0-1688692991251.png

     

    Best Regards,

    Wearsky

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I would argue that the compose is probably not even necessary at all. The expression suggested above can be used directly in the formatDateTime() expression resulting in formatDateTime(items('Apply_to_each')?['DateColumnName'],'MM/dd') for the first operand.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution.
    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • MImran Profile Picture
    10 on at

    Getting the same error after updating

     

    MImran_0-1688738931592.png

     

     

     

    MImran_1-1688739016901.png

     

  • MImran Profile Picture
    10 on at

    Hi,

    Getting the error again to run a flow

     

    MImran_2-1688739720260.png

     

     

    MImran_3-1688739785334.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You do not need the Compose action there. You're not using it anyway, as far as I can tell.

     

    As for the other error, it is a different one. It says the date you are trying to convert is not recognized as a date, because it is in an unsupported format. Can you share what the dates look like in your inputs?

     

  • v-xiaochen-msft Profile Picture
    on at

    Hi @MImran ,

     

    Please use 'Apply_to_each' here.

    vxiaochenmsft_0-1688951350952.png

     

    Best Regards,

    Wearsky

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard