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 / power automate send mail
Power Automate
Unanswered

power automate send mail

(0) ShareShare
ReportReport
Posted on by 96

I have created a power automate flow in which I have a SharePoint "When an item is created or modified" then an Outlook "send an email (V2)" in which among many other things I have 4 dynamic content date items.

 

The sent email shows the dates in yyyy-MM-dd format, and I'd really like to show it in MM/dd/yyyy format.

I have researched this and found several bloggers attempting to explain how to use the "formatDateTime()" expression to do this. So if my dynamic column reference was "RFP Expect Date" I'm told to input â€œ@formatdatetime(triggerBody()?[‘RFP_x0020_Expect_x0020_Date’],’MM/dd/yyyy')". 

 

When I try this I either get a popup stating the expression is invalid, or some other assorted MS errors about the ISO date format invalid... none of the examples from blog posts seems to work for me.

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi  @Robinhood 

     

    In your expression formatdatetime(triggerBody()?[‘RFP_x0020_Expect_x0020_Date’],’MM/dd/yyyy') you are using different type of quotes. Use single quotes every where.

     

    Try the below

     

    formatdatetime(triggerBody()?['RFP_x0020_Expect_x0020_Date'],'MM/dd/yyyy')

     

     

  • Robinhood Profile Picture
    96 on at

    thanks for suggestion, changed to '@formatdatetime(triggerBody()?[‘RFP_x0020_Expect_x0020_Date’],’dd/MM/yyyy')' and still get a popup screen with "The expression is invalid."

     
  • Robinhood Profile Picture
    96 on at

    Broadening the view up to 50kft, it seems  to me that being able to set the defaults for things like date formatting ought to be something that could be done from a setup screen or other... Seems to me to be rather user unfriendly to return values in strange formats rather than make assumptions based on context. US English is the default language, why not a settable default date format?

  • Verified answer
    Robinhood Profile Picture
    96 on at

    for the format working finallyfor the format working finally

     

    So I got this working. formatdatetime syntax looks like this:

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

     

    There is a difference now in the UI after I was experimenting with a compose function, that magically let's me input the fx expression.  Sigh, this is the high tech equivalent to the redneck expression, "how were you holding your mouth when you did that?"

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Robinhood 

     

    Thanks for the update. 

     

    Looks like the answer I provided earlier is the same. Can't see any difference at all.

     

    Thanks

  • Robinhood Profile Picture
    96 on at

    abm, no slight to your kind discussion of this at all. The solution had nothing to do with mixed quotation marks that I can see, though I do allow that till you mentioned that I was using a double quote around the entire expression, and after your post I ceased that practice. Had you not made that observation it is quite possible I'd still be wondering why it wasn't working.

     

    The magic in my case was after inserting a compose step, then deleting it, the ui changed... the placement of the dynamic control vs fx is now at top of the body section, rather than seeing those controls on the line item, and magically when entering the fx expression that I quoted, it is now accepted rather than flagging an error.

     

    In any case I am grateful for the opportunity to discuss this issue among those who practice these black arts and for the generous and kind suggestions that I am given!

     

    In the great blogusphere I found no mention of Power Automate multiple modes of edit. I do know the thing that changed UI presentation was inserting a compose step between "When an item is created or modified" and "Send an email(V2)" 

  • Robinhood Profile Picture
    96 on at

    hmm attempting to get back to the previous UI in Power Automate edit tool seems impossible, so my conclusion that the UI changed based on my inserting a compose step, was incorrect. Seems whilst in the process of doing this, the UI changed, and since it solved my problem I'd say for the better. 

     

    Now that I think about it, I had clicked the "turn on experimental features" on Power Automate settings... so that's *got* to be the source of the change. FWIW the UI change widgets are not as artistically rendered but the functionality imho greatly enhanced given it didn't crash and burn with a nasty error, but just worked.

     

    /Robin

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard