Showing results for 
Search instead for 
Did you mean: 
Not applicable

Format date with compose from Sharepoint list.



I'm trying to build a flow that checks Sharepoint List items that has an Invoiced Date field.


In Flow, I have a Get Items and an Apply for each, I have a condition with the following: 


@lessOrEquals(items('Apply_to_each_4')?['Invoiced_x0020_Date'], addDays(utcnow(),-365))


If True, I have a compose that does the following:


convertTimeZone(['Invoiced_x0020_Date'],'UTC','GMT Standard Time','MM')


Weirdly, the output of the compose is: convertTimeZone(4/1/2008,'UTC','GMT Standard Time','MM') and not the month number of the invoice date.


Can anyone help?

Community Support
Community Support

Re: Format date with compose from Sharepoint list.

Hi @Anonymous,


Could you show me a screenshot of your flow? I assume that you are entering the code directly in the Inputs field of the Compose action.


If so, please add an @ before the code then surround the code with double quotes.


Or you could also enter the code under the Expression tab. Please take the following image for a reference. it works fine on my side.


The code I am using is:

converttimezone(items('Apply_to_each')?['Date'],'UTC','GMT Standard Time','MM')






Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Format date with compose from Sharepoint list.

Hey, @Anonymous!


It appears as though @v-yamao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!


Thank you for being an active member of the Flow Community!



Flow Community Manager

Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

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