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 / 'The template language...
Power Automate
Unanswered

'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'.

(0) ShareShare
ReportReport
Posted on by 15
formatDateTime(utcNow(),'yyyy-MM-dd')

Is Equal To:

formatDateTime(triggerbody()?['Created'],'yyyy-MM-dd')
 
... where Created is a Sharepoint List default field of the same name.
 
Where is my syntax wrong?
Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @AscendCOE ,

    the triggerbody()? part seems wrong, try to use:

    triggerOutputs()?['body/Created']
  • AscendCOE Profile Picture
    15 on at

    Hello @Anonymous 

    I recieved the same Error:

     

    InvalidTemplate. 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'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
     
    formatDateTime(utcNow(),'yyyy-MM-dd') Is Equal To formatDateTime(triggerOutputs()?['body/Created'],'yyyy-MM-dd')
     
    Do you have any other thoughts? Should the functions be reversed?
  • MJain Profile Picture
    2,450 on at

    Hi @AscendCOE ,

     

    I suggest you use compose action and put triggerOutputs()?['body'] in expression to see what is the output you are getting . If you get created field in this then you are good to use but check the output properly if you are looking for something else .

     

    Thanks

  • AscendCOE Profile Picture
    15 on at

    Hi @ManishJain 

     

    I ran a compose on the function: 

    "formatDateTime(triggerOutputs()?['body/Created'],'yyyy-MM-dd')"
     
    And the output was the same as the function. Based on your previous statement you're suggesting I am not referencing the field properly?
  • MJain Profile Picture
    2,450 on at

    Hi @AscendCOE ,

    possibly yes , that is where if you do compose action and put triggerOutputs()?['body'] it will give you all fields to look at . Once you are able to figure it out remove this compose action and put it in formatDateTime .

     

    Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard