cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Formatting date only

Hi,

 

I have an expiry dat that returns as 2021-01-25T08:00:00Z and I want to compose an email stating what is the expiry date in this format: 25 Jan 2021. I tried using 

 

formatDateTime(triggerBody()?['Expiry Date'],'dd/MM/yyyy')

 

but it doesn't work. it gives me this error 

 

InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_notification_(V3)' inputs at line '1' and column '14342': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

 

 

Please help me. Thank you in advance

23 REPLIES 23

@ViditGholam Sure. Thank you! 

Hello @ViditGholam !

 

I think I solved it. 

Edinaa_0-1617172516549.png

It works if I put the 1 as string 😄

ViditGholam
Continued Contributor
Continued Contributor

@Edinaa  Hahaha great Let me know any case you face any other issue

Hello ViditGholam, 

I'm having a similar problem. My flow keeps failing at my condition called "Verify Hire Date is in the past". 

This was working before an now it's not. I'm trying to verify the date of hire and to ensure it doesn't occur in the past so I can send out task assignments to new hires. Any thoughts as to what I'm doing wrong? 

powerautomate error1.jpgpowerautomate error2.jpg

Thank you in advance for your help. 

SD

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,642)