Hi @NurNina
For a Dataverse calculated field, the DIFFINDAYS function that you mentioned would be the one to use.
DIFFINDAYS (EndDate,StartDate)
This would return a numeric value of the difference in days.
The other available functions include:
DIFFINHOURS, DIFFINMINUTES, DIFFINMONTHS, DIFFINWEEKS, DIFFINYEARS
I'm not sure what you mean when you say that you want to return type to be date. Can you clarify what you mean by this?
For example, let's assume a start date of 1 Jan 2021, and an end date of 3 Jan 2021. What would a date representation of a two-day difference look like, or what would you like the IR Due Date value to look like this example? Are you saying that you want to add the difference to the EndDate like so?
ADDDAYS(DIFFINDAYS (EndDate,StartDate), EndDate)