web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Formatting SharePoint ...
Power Automate
Unanswered

Formatting SharePoint list calculated date column in Flow-generated email

(0) ShareShare
ReportReport
Posted on by 36

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.

 

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

    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,

  • Verified answer
    whitelc Profile Picture
    36 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard