• This expression will find the difference between two dates:
div(sub(ticks('2019-05-13'),ticks('2019-05-04')),864000000000)
  • The date areas above can be dynamic content as well like so:
div(sub(ticks(triggerOutputs()?['body/DueDate']),ticks(formatDateTime(utcNow(), 'yyyy-MM-dd'))),864000000000)
  • DueDate in the example above is a column in a SharePoint Task List and the other date is how you calculate the current date time (today)
  • For reference here is the code for today’s date and time:
formatDateTime(utcNow(), 'yyyy-MM-dd')

References:

https://powerusers.microsoft.com/t5/Building-Flows/Number-of-days-between-two-Dates/td-p/281578
https://debajmecrm.com/get-todays-date-in-power-automate-microsoft-flow/