cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Elitezone
Post Prodigy
Post Prodigy

Format date Sharepoint List to Teams message

Hello,

 

I created a flow that send a message with details of sharepoint list that position that was either created or updated.

This flow is not bad, but a date is in this format:

2020-09-30T13:38:30Z - also it is two hours behind

 

I created a Data Convert Card:

Elitezone_0-1601473820429.png

but date is still the same in output:

Elitezone_1-1601473869152.png

 

Data Convert Card is before a action Card send Teams Message.

 

I cannot do it with expression. My formula always fails.

Can anyone help a bit.

 

I want to transform two field (Utworzony - date of creation, Zmodyfikowany - date of modification to format)

DD:MM:YYYY, HH:MM

 

3 REPLIES 3
sudharsan1985
Super User
Super User

Hi @Elitezone 

Try to use the Compose action with the below-given formula, I had used the default item created date as the argument.

formatDateTime(triggerBody()?['Created'], 'dddd MM/dd/yyyy')

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

@sudharsan1985 

It works but time is still 2h behind it seems to take UTC while my sharepoint list has correct time....

 

This is very weird.

@Elitezone 

 

When you are passing datetimes through triggers and actions in Microsoft Power Automate, users may find a datetime in the wrong time zone. Users may wish to convert the time zone (frequently in UTC) to their local time.

 

For details see: https://support.microsoft.com/en-in/help/4557244/converting-time-zone-in-microsoft-power-automate 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (34,420)