cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OzanOZEN
Level: Powered On

I can't use formatDateTime help please

 Hi,

I want to use "formatDateTime" expression in my flow but I can't.  I tried below list:

 

"@formatDateTime(@{body('Start_an_approval')?['responseDate']},'yyyy-MM-dd')"

or

@formatDateTime(@{body('Start_an_approval')?['responseDate']},'yyyy-MM-dd')

or

formatDateTime(@{body('Start_an_approval')?['responseDate']},'yyyy-MM-dd')

or

=formatDateTime(@{body('Start_an_approval')?['responseDate']},'yyyy-MM-dd')

or

"=formatDateTime(@{body('Start_an_approval')?['responseDate']},'yyyy-MM-dd')"

 

but always get results with "@formatDateTime(2018-09-25T14:37:49.4671573Z,'yyyy-MM-dd')"

 

could you please help ?

 

my flow:

image.png

results:

image.png

I've checked ref. links below but I didn't success:

https://www.o365dude.com/2017/05/01/working-with-dates-times-in-microsoft-flow/

https://nicknow.net/microsoft-flow-dates-times-timezones-formatting/

https://powerusers.microsoft.com/t5/General-Discussion/PowerApps-to-Flow-Date-Format-problem/m-p/492...

https://powerusers.microsoft.com/t5/Connecting-To-Data/formatDateTime/m-p/24013

 

Regards,

2 REPLIES 2
Community Support Team
Community Support Team

Re: I can't use formatDateTime help please

Hi @OzanOZEN,

 

The expression should be as below:

"@formatDateTime(body('Start_an_approval')?['responseDate'],'yyyy-MM-dd')"

I have made a test on my side and have created a flow as below:

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

 

OzanOZEN
Level: Powered On

Re: I can't use formatDateTime help please

Hi @v-yuazh-msft

Thank you for reply. I tried on my flow but results same. Could you pleaes check my flow and results:

I used MS forms integrated.

 

flow:

image.png

 

results:

image.png

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,144)