Skip to main content
Community site session details

Community site session details

Session Id : 7p3zmfCCbwqCsk1DSMT/U6
Power Automate - General Discussion
Answered

Date Display formatDateTime Issues in Loop for Output

Like (0) ShareShare
ReportReport
Posted on 25 Jun 2020 16:46:46 by 203
I'm trying to format my date field for display (basically chop off the time) from a D365 date to put into an email and I'm getting
 
"The expression is invalid." when I try to do this in the Expressions window. The xxxx_notificationdate is in a Apply to Each loop. 
 
formatDateTime(@{items('Apply_to_each')?['xxxx_notificationdate']},'yyyy-MM-dd')
 
What am I doing wrong?
  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 25 Jun 2020 at 16:57:18
    Re: Date Display formatDateTime Issues in Loop for Output

    @saturation 

     

    Please use this-

    formatDateTime(items('Apply_to_each')?['xxxx_notificationdate'],'yyyy-MM-dd')

     

    Thanks

    Hardesh

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2