cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexyoy111
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

 

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
ChristianAbata
Super User
Super User

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

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
 

 

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.

Thank you !

This solved the problem

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (6,059)