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

Unable to convert date field inside apply to each

Hi, I am unable to locate the LeasedExpiry date field as soon as I use the formatdatetime() command.  I just see list of item & value. Appreciate a quick support on this issue.

FormatDateTime.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Unable to convert date field inside apply to each

Hello @shoebwk 

 

Here is a screenshot of my previous reply by using compose to store the date first:

Jcook_0-1596592423881.png

 

In my picture you can see that I also cannot select the Modified field in my expression, But since I first added just that field to a compose, I am now able to use the Outputs of the compose inside my expression.

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Community Support
Community Support

Re: Unable to convert date field inside apply to each

Hi @shoebwk ,

 

It is the expected behavior, you should refer to screenshot below to create the flow if you add a Compose:

1.png

formatDateTime(outputs('Compose'),'yyyy-MM-dd')

 

Or you could use the expression for the LeasedExpiry column directly:

formatDateTime(items('Apply_to_each')?['LeasedExpiry'],'yyyy-MM-dd')

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

7 REPLIES 7
Highlighted
Super User III
Super User III

Re: Unable to convert date field inside apply to each

Hello @shoebwk 


Can you add a Compose action inside the loop bit above the email. Put the LeasedExpiry dynamic content inside the compose.

 

Now inside the email action. Use your formatdatetime() expression and pass in the outputs for the compose.





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Helper III
Helper III

Re: Unable to convert date field inside apply to each

Its the same behavior . As soon as I start writing the formula, the fields from SP list are missing

shoebwk_0-1596591979199.png

 

WithDynamicexpression.pngwithoutFormula.png

Highlighted
Super User III
Super User III

Re: Unable to convert date field inside apply to each

Hi @shoebwk 

 

 What is the data type in SharePoint for that field?





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Super User III
Super User III

Re: Unable to convert date field inside apply to each

Hello @shoebwk 

 

Here is a screenshot of my previous reply by using compose to store the date first:

Jcook_0-1596592423881.png

 

In my picture you can see that I also cannot select the Modified field in my expression, But since I first added just that field to a compose, I am now able to use the Outputs of the compose inside my expression.

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Community Support
Community Support

Re: Unable to convert date field inside apply to each

Hi @shoebwk ,

 

It is the expected behavior, you should refer to screenshot below to create the flow if you add a Compose:

1.png

formatDateTime(outputs('Compose'),'yyyy-MM-dd')

 

Or you could use the expression for the LeasedExpiry column directly:

formatDateTime(items('Apply_to_each')?['LeasedExpiry'],'yyyy-MM-dd')

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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 III
Helper III

Re: Unable to convert date field inside apply to each

Date and Time

Highlighted
Super User III
Super User III

Re: Unable to convert date field inside apply to each

@shoebwk 

 

formatDateTime(outputs('Compose'),'yyyy-MM-dd hh:mm')

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,896)