Hello,
I am quite new to Power Automate.
I need to get the difference between two dates and see, if it is more than 365. If so I want to do something otherwise I just do nothing.
I found this post:
https://powerusers.microsoft.com/t5/Building-Flows/Number-of-days-between-two-Dates/td-p/281578
and think this might be very helpful:
div(sub(ticks('2019-05-13'),ticks('2019-05-04')),864000000000)
Now my problem is to fill the date within the ticks-formula.
For the first date I use utcNow() which at least does not lead to a syntax error.
However I have difficulties setting the second date.
I tried to put it in a variable called "nextTermin".
So my expression looks like this:
div(sub(ticks('utcNow()'),ticks(variables('nextTermin')),864000000000)
However Power Automate says the expression is invalid.
I also tried to put the string within the second ticks in quotation marks - ticks('variables('nextTermin')' but this does not work either.
Any help very appriciated.
Thank you!