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 Automate
Answered

AddMinutes

(0) ShareShare
ReportReport
Posted on by 12

Hi there

 

I cant't get the following expression to work:

 

@less(utcNow('yyyy-MM-ddThh:mm:ss'), formatDateTime(addMinutes(item()?['Created'], 0), 'yyyy-MM-ddThh:mm:ss'))

 

Any idea?

 

Best Regards

 

 

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

    Hi @Diego,

     

    I assume that you want to check if an item is created several days before utcNow.

     

    So I create a simple flow for testing with the following function. The code I am using is:

    @less(formatDateTime(items('Apply_to_each')?['Created'],'yyyy-MM-dd'), adddays(utcnow('yyyy-MM-dd'),-3))

     

    When the flow is triggered, items that are created 3 days before will be got and notifications will be sent. Please check the following screenshot:

    1.PNG

     

    Please feel free reply if you need more help. 

     

    More details about the function:

    https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

     

     

     

    Best regards,

    Mabel Mao

  • Verified answer
    Diego Profile Picture
    12 on at

    Hi Mabel

     

    Thank you very much for the fast reply. I knew the function you sent me with addDays. For testing purposes I wanted to use addMinutes. I got this figured out now:

     

    @less(formatDateTime(addMinutes(item()?['Created'], 1),'yyyyMMddHHmmssffff'),utcNow('yyyyMMddHHmmssffff'))

     

    Here for the community my flow to delete old files. Special in this flow is that I don't want to delete folders, otherwise younger files may be deleted along with an old folder.

     

    To do this I added the following filter query to the "Get Files (properties only)" action:

    ContentType eq 'Document'

     

    Here the screenshot of my small flow

     

    DeleteOldFiles.jpg

     

    Best Regards

    Diego

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard