cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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 (4,027)