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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / formatDateTime Express...
Power Automate
Unanswered

formatDateTime Expression Failing

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm trying to build a survey where if a participant's appointment date is today, Power Automate sends our team a certain message. However, I'm having trouble with the logic condition. I keep receiving this error message in regards to my condition branch "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 'Null'. " 

 

My expressions are below, does anyone see any issues with them?

 

Sincerely,

kbredden 

 

formatDateTime(utcNow(), 'yyyy-MM-dd hh:mm tt'
formatDateTime(triggerBody()?['Next_Timeline_Date'], 'yyyy-MM-dd hh:mm tt')
 
 
Screenshot (104).png

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,268 Most Valuable Professional on at
    Re: formatDateTime Expression Failing

    @Anonymous 

    The error indicates that Next_Timeline_Date is null.  I suggest looking at the outputs of one of your failed runs.  Check the output of your trigger and see if the values that you expect are there.  You might also add one or more Compose actions before your condition fir test purposes - set the compose action equal to the values used in your condition and run the Flow again.  Check the values of your Compose actions after the Flow runs/fails.

     

  • Community Power Platform Member Profile Picture
    on at
    Re: formatDateTime Expression Failing

    @ScottShearer Thank you for your response! All I was able to find out is that it was the second expression returning the error. My flow is recurring so I'm not sure if that will really return the output we're looking for. Is there perhaps another expression that could work to the effect I'm looking for?

     

    Thanks,

     

    kbredden

  • ScottShearer Profile Picture
    25,268 Most Valuable Professional on at
    Re: formatDateTime Expression Failing

    @Anonymous 

    I don't see anything wrong with your expression - the cause of the error is that a null value is being provided for Next Timeline Date.  To fix your Flow, you need to take a look at the outputs of a run.

    What trigger are you using?

     

  • Community Power Platform Member Profile Picture
    on at
    Re: formatDateTime Expression Failing

    @ScottShearer I'm using recurrence!

  • ScottShearer Profile Picture
    25,268 Most Valuable Professional on at
    Re: formatDateTime Expression Failing

    @Anonymous 

    You can test run your Flow and run it at any time even though it is using a recurrence trigger.  

    image.pngimage.png

    You could also temporarily replace your recurrence trigger with a button.  Either way, you can run the Flow any time you want.

  • Community Power Platform Member Profile Picture
    on at
    Re: formatDateTime Expression Failing

    @ScottShearer My apologies, I should have clarified. I was able to run and test the flow but wasn't sure the output from the recurrence trigger was what we were looking for when you mentioned checking the output of the trigger. Here's where I looked. Please let me know if I misunderstood your directions!

     

    kbredden

     

    Screenshot (107).png

  • ScottShearer Profile Picture
    25,268 Most Valuable Professional on at
    Re: formatDateTime Expression Failing

    @Anonymous 

    Sorry - I may have been confused as well.  

    Can you tell me what action the Next_Timeline_Date comes from?  

     

  • Community Power Platform Member Profile Picture
    on at
    Re: formatDateTime Expression Failing

    @ScottShearer It should be coming from Get Items. It's the title of a column in our Sharepoint List.

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard