web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : hOcwV2CoH/PbQvml07tjZz
Power Automate - Using Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 6 Mar 2019 22:27:35 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 08 Mar 2019 at 22:08:13
    Re: totally lost trying to calculate days using ticks get items with sharepoint list

    Thank you!

  • Verified answer
    v-yamao-msft Profile Picture
    on 08 Mar 2019 at 05:24:31
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow