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

>