Skip to main content

Notifications

Power Automate - General Discussion
Answered

Date Display formatDateTime Issues in Loop for Output

(0) ShareShare
ReportReport
Posted on 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
    Hardesh15 7,087 on at
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard