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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / AddDays utcNow date fo...
Power Automate
Unanswered

AddDays utcNow date format

(0) ShareShare
ReportReport
Posted on by

I need help to formulate Filter Query.  I have a flow with (sharePoint) Get Items action with Filter Query.  What I am trying to to is to get all changes in the list for last 2 days.  This formula that I used in the Filter Query seems to work but not the format I want.

This is the formula I used in the Filter Query -

Created ge 'addDays(utcNow('MM-dd-yyyy'),-2,'MM-dd-yyyy')' and Modified ge 'addDays(utcNow('MM-dd-yyyy'),-2,'MM-dd-yyyy')' 

This is the date format from the flow -

2020-10-15T14:42:11Z

My desired date format -

10-15-2020 or 10/15/2020.  I want the date to be displayed as MM DD YYYY.

SPRock76_0-1602948252795.png

Thanks,

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hello @SPRock76 

    In the filter query expression you should use the format 'YYYY-MM-DDThh:mm:ssZ', so the expression you would be:

    Created ge 'addDays(utcNow('YYYY-MM-dd'),-2)' and Modified ge 'addDays(utcNow('YYYY-MM-dd'),-2)

    If you want to change how the date is displayed, then you should apply the desired format using an expression like:

    formatDateTime('your_datetime_variable','MM-dd-YYYY')

    Hope it helps!

    Ferran 

  • ajdhingr Profile Picture
    Microsoft Employee on at

    @SPRock76 - Please let us know if the issue is resolved. To understand more abt date and time you may also refer to this https://flowaltdelete.ca/2020/10/15/converting-time-zones-easily-in-power-automate/ blog also.

     

    @fchopo thanks for sharing the solution   

     

  • emersonbruce Profile Picture
    54 on at

    you should use the Add dynamic content > Expression tab > enter text as noted below adjusted to your needs > ok

    the format uses a lower case y

    addDays(utcNow('yyyy-MM-dd'),-2)

    I adjusted the 2 to 30 days for 30 day old incomplete task emails to be sent daily.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 462

#2
Vish WR Profile Picture

Vish WR 256

#3
David_MA Profile Picture

David_MA 242 Super User 2026 Season 1

Last 30 days Overall leaderboard