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.
Thank you!
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.
Best regards,
Mabel
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional