Hello forum. The forum has been a lifesaver. So thank you.
I am created a flow that checks a SP list for any item that is 30 days from the Expire date (date column in SP). At 30 days, the flow sends out a notification. Within the notification, I want to have the flow calculate the number of days that the item has been active. This would be accomplished by taking the current date and subtracting the Created date. I have tried different expression formulas without success.
-- sub(formatDateTime(utcNow(), 'yyyy-MM-dd'),formatDateTime(items('Apply_to_each_2')?['Created'], 'yyyy-MM-dd')) <-- states that the 1st parameter is a string even after formatting
-- subtractFromTime(formatDateTime(utcNow(), 'yyyy-MM-dd'),formatDateTime(items('Apply_to_Each_2')?['Created'],'yyyy-MM-dd'),'Day')
-- subtractFromTime(utcNow(),items('Apply_to_Each_2')?['Created'],'Day')
Tried variations of the above formulas and have not been successful. I also tried creating variables and using the Compose action without success.
Any ideas?
Thanks again for this forum!! and hope everyone has a safe and wonderful holiday season.