cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

formatDateTime Failed because of strange error

Hello

 

I am trying to format date field but getting this error - 

The execution of template action 'Create_HTML_table' failed. The column values could not be evaluated: 'The template language expression 'formatDateTime(triggerBody()['scheduledend'],'yyyy-MM-dd')' cannot be evaluated because property 'scheduledend' cannot be selected. Please see https://aka.ms/logicexpressions for usage details.'.

 

This is line: formatDateTime(triggerBody()['scheduledend'],'yyyy-MM-dd')

 

testtt.png

 

 
 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: formatDateTime Failed because of strange error

 

Hi @alexyoy111 ,

 

Please try to use formatDateTime(item()['scheduledend'],'yyyy-MM-dd').

Besides, you could check the body of List records action to get the actual name of the field and fill this name in the expression:

formatDateTime(item()['FiledName'],'yyyy-MM-dd')

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: formatDateTime Failed because of strange error

hi @alexyoy111  cloud you show us the output in triggerBody()['scheduledend'] ?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Helper II
Helper II

Re: formatDateTime Failed because of strange error

Hi @ChristianAbata 

 

I'm not sure how to show you the output or what I need to do in order to see the output.

 

This is the formula that I use to format the date:

formatDateTime(triggerBody()['scheduledend'],'yyyy-MM-dd')

 

testtt.png

 

:The error I'm received

 

InvalidTemplate. The execution of template action 'Create_HTML_table' failed. The column values could not be evaluated: 'The template language expression 'formatDateTime(triggerBody()['scheduledend'],'yyyy-MM-dd')' cannot be evaluated because property 'scheduledend' cannot be selected. Please see https://aka.ms/logicexpressions for usage details.'.
 
out.png
 
Highlighted
Community Support
Community Support

Re: formatDateTime Failed because of strange error

 

Hi @alexyoy111 ,

 

Please try to use formatDateTime(item()['scheduledend'],'yyyy-MM-dd').

Besides, you could check the body of List records action to get the actual name of the field and fill this name in the expression:

formatDateTime(item()['FiledName'],'yyyy-MM-dd')

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper II
Helper II

Re: formatDateTime Failed because of strange error

Thank you !

This solved the problem

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,259)