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

Formatting SharePoint list calculated date column in Flow-generated email

I have a SharePoint list with two calculated date columns. I've written a Flow to generate an email. The email needs to contain the values of both calculated date columns in the format mm/dd/yyyy.

 

I can get the dates to show up in the email, but only in UTC format. I've tried every combination of "formatDateTime" that I've found from web searching. Most often, I get this error:

 

Unable to process template language expressions in action 'Compose_-_format_Hire_Date_+_3_Months' inputs at line '1' and column '2540': 'The template language function 'formatdatetime' expects its first parameter to be of type string. The provided value is of type 'Null'.

Can anyone point me the right direction? Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
whitelc
Level: Powered On

Re: Formatting SharePoint list calculated date column in Flow-generated email

Thanks, Barry. I got it to work by using the Expression

FormatDateTime(triggerBody()?['OData__x0033_Months'],'MM/dd/yyyy')
in the email. Did not need Compose action at all.

 

I still can't make it work in the PowerApp, though, so I've posted to that Forum.

 

Thanks.

2 REPLIES 2
Community Support Team
Community Support Team

Re: Formatting SharePoint list calculated date column in Flow-generated email

Hi @whitelc ,

 

Could you share the details of Compose_-_format_Hire_Date_+_3_Months action configuration?

Could you share screenshots of the Flow configuration? We can't know which action or trigger you are getting the specified field value.

 

The error message indicates that the first parameter of the function is empty, and you may not use the appropriate Expression to get the specified column value.

Please make sure that the Date field you mentioned is not empty, then use the appropriate Expression to get this value.

 

I had a test on my side, use When an item is created as a trigger, get the specified field value, and format it using formatDateTime() function.

Expression reference:

formatDateTime(triggerBody()?['CalculateDate'],'MM-dd-yyyy')

Image reference:

39.PNG

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
whitelc
Level: Powered On

Re: Formatting SharePoint list calculated date column in Flow-generated email

Thanks, Barry. I got it to work by using the Expression

FormatDateTime(triggerBody()?['OData__x0033_Months'],'MM/dd/yyyy')
in the email. Did not need Compose action at all.

 

I still can't make it work in the PowerApp, though, so I've posted to that Forum.

 

Thanks.

Helpful resources

Announcements
firstImage

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 185 members 5,141 guests
Please welcome our newest community members: