It sounds as if you want to retrieve other data than is in your database (weeks between is not in your DB). XPath is not for that, it's a filter. What do you want to accomplish?
In XPath, you can only retrieve MendixObject instances, simple attribute values or aggregated values. To find the weeks elapsed after a date, you can execute OQL queries with the function DATEPART in Java.
It is possible to use date part functions in XPath, but only in constraints, such as week-from-dateTime, see https://world.mendix.com/display/NRG/XPath+week-from-dateTime.
the solution is on this post. Thanks for everyone's help.