SOLVED

Changing Date format in flow email

New Contributor

I have created a form in MS Forms and then created an automated flow for when the form is submitted. I want the content to be sent in an email but i need the date to come through in the format dd/MM/yyyy not yyyy/MM/dd. I have tried using the formatdatetime function but I don't understand how to enter the dynamic content from the form (Date of Incident). I get an error saying the value is null and needs to be a string. I have posted an image of my flow. It cut off the function expression which is formatDateTime('[Date_of_Incident]',dd/MM/yyyy') I have tried no underscores, no square brackets???? Do i need to change the input outside of the email first???? I'm new to this and cant find any answers from searches I have done. Please help!!

 

 

tlw010779_0-1648163903800.png

 

2 Replies
best response confirmed by tlw010779 (New Contributor)
Solution

@tlw010779 I don't know if you have the get response from the form. You have to add the date in the forms for date of incident and then use that date on formatDatetime to change as you need. I am attaching few screenshots for you to make it more clear

 

NitinJJ_0-1648219723415.png

 

I have used compose function just to show you, If that is working or not. Check the output as below

 

NitinJJ_1-1648219781195.png

 

 

Make sure you have the date format defined in your forms as below.

 

NitinJJ_2-1648219931294.png

 

 

Please let me know if that helps.

 

@NitinJJ worked perfect, thanks so much.