I am trying to find a way to find the difference between two dates. for example, the difference between current date - previous dates = number of days or number of weeks or number of months. Can anyone help me please.

Thank you

Hello,
try this:

{days-from-duration(xs:date(/Net-Name/Date-Variable)-xs:date(current-date())}
Im using this XQuery in my net for a Input-Binding