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

Announcements

News and Announcements icon
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 Microsoft Employee

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:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @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
    Microsoft Employee on at

    @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,331 Most Valuable Professional on at

    @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
    Microsoft Employee on at

    @ScottShearer I'm using recurrence!

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @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
    Microsoft Employee on at

    @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,331 Most Valuable Professional on at

    @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
    Microsoft Employee on at

    @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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard