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 / Expression to subtract...
Power Automate
Answered

Expression to subtract the date of "created on" from current time

(0) ShareShare
ReportReport
Posted on by 1,710

Hello,
I have created a flow that will filter all the active cases in an entity and display them in an HTML table.

What I want to achieve is the following:

  • I would like to subtract the UTC now() date and the date that the case was created on.
    The default column expression of "Created on" column is the following:

Capture.PNG

Capture.PNG

  • Besides, after the estimation is completed I want to concatenate to the result, "Day" if it's less than one, and Days if it's greater than one.

What could be the expression for this scenario?
Can please someone provide an example?

 

Any help will be greatly appreciated.
Thank you!

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Julien2 

     

    You can use the expression: 

    addDays(utcNow(),-7,'dd/MM/yyyy')
     
    This will subtract 7 days off today's date, for you pre-defined date you would replace utcNow() with your field.
     
    Hope this helps 🙂
     
    Thanks

    Bradley
  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @Julien2 

     

    Thanks for the screen share.

     

    The below expression will give you the number of days.

    div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(formatDateTime(items('Apply_to_each')?['createdon'],'yyyy-MM-dd'))),864000000000)
     
    Thanks
  • EBMRay Profile Picture
    1,710 on at

    Hello @abm,

     

    Thank you very much for your support!

     

    Regards,

    Julien

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard