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 / What could be causing ...
Power Automate
Unanswered

What could be causing my format date and time to fail?

(1) ShareShare
ReportReport
Posted on by

So in the excel file itself the end date is formatted as dd/mm/yyyy and does have something in the cell 26/07/2024

In list rows present in table I have the date time format set to ISO 8601 

 

and in the email I am sending I am using the following expression

 

formatDateTime(triggerOutputs()?['body/{Worker End Date}'], 'MM-dd-yyyy'
 

When I run the bot however on the send email v2 step I get the following error:

 

InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_(V2)_2' inputs 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.'.

 

 

If I don't use an expression the result in the email I get is 2024-07-26T00:00:00.000Z

What can I do to fix this?

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @rmartori 

     

    It looks like the property 'Worker end date' does not exist in output body of trigger.

     

    Please select dynamic date value from dynamic content window & pass it in the below expression:

    formatDateTime(<select date value from dynamic content window>'MM-dd-yyyy'

     

     

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard