Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

totally lost trying to calculate days using ticks get items with sharepoint list

(0) ShareShare
ReportReport
Posted on by 31

So I will try and describe what i need as best as possible.  I have a recurring flow that emails an excel report to the recipient every wednesday.  I have been asked to include in my excel table a column that calculates the number of days since the created date.  for example when an item is created how long in days, has it been open.  I have looked all over and have seen that ticks is probably the way to go, since diffdate isn't available, but i can't get anything to work.  I was thinking that something along the lines of this    div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(item()?['Date Created:'])),864000000000) but i need to apply it to every row in table, and don't know if there is a way to do this.  Here is my flow:  I have more to the flow just need to address days open.  thank you.Capture.JPG

  • Lowkey Profile Picture
    31 on at
    Re: totally lost trying to calculate days using ticks get items with sharepoint list

    Thank you!

  • Verified answer
    v-yamao-msft Profile Picture
    on at
    Re: totally lost trying to calculate days using ticks get items with sharepoint list

    Hi @Lowkey ,

     

    Do you want to get items from the list then insert them into an Excel file. In addition, you would like to get the number of days between two days and insert it into the Days open column.

    I have made the following test for your reference.

    Before starting the flow, please format the Days open column as type Number and set Decimal places as 0 in the Excel.

    The flow is configured likes below. Input the following code in the Days open column:

    div(sub(ticks(formatDateTime(utcNow(),'yyyy-MM-dd')),ticks(item()?['Date'])),864000000000)

    Please take a try with it on your side.

    1.PNG

     

    Best regards,

    Mabel

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow