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

Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

Looking for an easier way than https://powerusers.microsoft.com/t5/Building-Flows/convert-date-dd-mm-yyyy-to-mm-dd-yyyy0/m-p/131645...

 

I am receiving yyyy-MM-dd from SharePoint list into Power Automate. Would like to convert it to MM-dd-yyyy before it's inserted into a document as below:

 

2020-04-16_21-13-26.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

Hi @wiredupjax 

 

for date requested you can use the expression: formatDateTime(triggerBody()?['date_requested'],'MM-dd-yyyy')

 

for end date you can use the expression: formatDateTime(triggerBody()?['end_date'],'MM-dd-yyyy')

 

Hope this Helps!

 

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!

View solution in original post

5 REPLIES 5
Highlighted
Super User II
Super User II

Re: Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

Hello @wiredupjax 

If the date you are receiving is a real datetime value, then you can use the FormatDatetime function under Expression.

Kind regards, John

Highlighted
Dual Super User III
Dual Super User III

Re: Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

Hi @wiredupjax 

 

for date requested you can use the expression: formatDateTime(triggerBody()?['date_requested'],'MM-dd-yyyy')

 

for end date you can use the expression: formatDateTime(triggerBody()?['end_date'],'MM-dd-yyyy')

 

Hope this Helps!

 

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!

View solution in original post

Highlighted
Helper III
Helper III

Re: Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

It's throwing an ISO format error because I'm only getting yyyy-MM-dd and it wants the full format w/ time.

Highlighted
Super User II
Super User II

Re: Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

Hello @wiredupjax 

Did you solve it or did the last post indicate that you still has an issue?

Kind regards, John

Highlighted
Helper III
Helper III

Re: Convert time when receiving yyyy-MM-dd to dd-MM-yyyy

solved!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Users online (8,110)