cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Format Multiple Dates in compose

Hi,

 

I have the following flow that gets multiple calendar entries and formats an HTML table before posting the output to Teams. All works fine with the exception that I would like to format the start and end dates but through all the searing and testing I can't find a solution.

 

Screenshot 2020-01-27 at 13.39.39.png

 

Can anyone confirm how best to achieve this? Many thanks!

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Format Multiple Dates in compose

@nexus_sy 

This sounds like a Power Automate question rather than a PowerApps question. You'll want to post this in the Power Automate Community instead.

Link to Power Automate Community
https://powerusers.microsoft.com/t5/Get-Help-with-Power-Automate/ct-p/FL_GeneralDiscussions


---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Super User
Super User

Re: Format Multiple Dates in compose

This is a better question for the Power Automate (Flow) Forum...BUT...to format the date you do:

 

formatDateTime(<click field from dynamic content>,'MM/dd/yyyy')

 

for the part that says <click field from dynamic content> you don't include the <>...just click on it.

Highlighted
New Member

Re: Format Multiple Dates in compose

Sorry for posting in the wrong place. I tried what you suggested but it didn't seem to work: formatDateTime appears in the output

 

2020-01-27 at 14.22.png

Highlighted
Super User
Super User

Re: Format Multiple Dates in compose

You have to do that part with the date using the Expression part. 

 

* Click wherever you want it to show and have the box pop out to the right side that shows the Dynamic content and click Expression.

* start typing in the function box FormatDateTime...it will start narrowing down the options and when you see it pop up just below in purple click on it and so you will have just "formatDateTime" in the function box..put in an "(" and then at the type click Dynamic Content so it shows the choices you can select and find your date field and click on it - when you do it will add something similar to body('Get_item')?['Created'] inside your Parenthesis - just depends on what your field is called and what its pulling from on this part. 

* after you have clicked on it go up to that box and go to the end of what it added in but before your close parenthesis (that was added automatically when you put the open one and put -- ,'MM/dd/yyy'

* Then click OK -- blue button 

 

After you click Okay it should show up where you added in purple/pink with an fx and then just show formatDateTim… but if you hover of it you will see the full thing you put in.

 

Let me know if you still have trouble and I can probably do a quick video to show you.

 

 

Highlighted
New Member

Re: Format Multiple Dates in compose

Thanks, when I go back to select 'Start Time' from Dynamic only two options are available:

 

Screenshot 2020-01-27 at 14.42.06.png

 

Thanks

Highlighted
Super User
Super User

Re: Format Multiple Dates in compose

That is if you have where you are getting multiple items like by using 'Get items' instead of 'Get item' - even if you have a filter that is telling it just one item it still recognizes it as multiple. If that is the case you have to put your action (send email, I think is what you have) inside an 'Apply to each'

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.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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 (6,950)