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

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard