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

How to count Date?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have file excel in shared point. 

I want to count date in column Import Date to data today.

 

count = (date today - date in column Import Date)

Noona_2-1629427142006.png

 

Please guide me about it.

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

    Hi @Anonymous 

    Please try using the Expression below to calculate the difference between the two dates.

    div(sub(ticks('2021-08-20'),ticks('2021-12-01')),864000000000)

    You can refer to screenshots as below:

    vLilyWmsft_0-1629432735156.png

    Expression:

    div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(formatDateTime(outputs('Compose'),'yyyy-MM-dd'))),864000000000)

    vLilyWmsft_1-1629432769816.png

    vLilyWmsft_2-1629432946486.png

    For more info you can refer to:

    https://sympmarc.com/2021/02/22/calculate-the-difference-between-two-dates-in-power-automate/

    https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Flow-Calculate-Date-Diference/ba-p...

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-LilyW-msft  How to replace 2021-12-01 follow data in excel?

  • v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous 

    Please see the formula in the details, the marked part is the date in excel

    vLilyWmsft_0-1629434944868.png

    Best Regards.

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 516

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 470

Last 30 days Overall leaderboard