This sounds like a SQL implementation issue between two different types of database.
If you want to find the number of days between two dates in a Mendix application you can use the built-in daysBetween function.
https://docs.mendix.com/refguide/between-date-function-calls/#6-daysbetween
I hope this helps.