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 : 2hCiSrRl2U3H/RvWPU0NBo
Power Automate - Building Flows
Unanswered

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

Like (1) ShareShare
ReportReport
Posted on 11 Jul 2024 15:27:39 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?

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 2 on 11 Jul 2024 at 15:58:17
    Re: What could be causing my format date and time to fail?

    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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2