See the documentation here: https://docs.mendix.com/refguide/between-date-function-calls/
Regards,
Ronald
Take a look at the built in daysBetween function. It returns a decimal, so you will have to convert this to an integer if you just want the number of whole days.
https://docs.mendix.com/refguide/between-date-function-calls/#6-daysbetween