cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lowkey
Level: Powered On

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

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

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

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

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Lowkey
Level: Powered On

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

Thank you!

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (9,272)