## Arithmetic Functions Dates and Times

    add-yearMonthDuration-to-dateTime( xs:dateTime("2000-10-30T11:12:00"), xdt:yearMonthDuration("P1Y2M"))

from within a Java application, in order to extract the result from the result sequence, one would have to use this code:

    String n = ((XSDateTime)rs.first()).stringvalue();
    println(n);

which returns an xs:dateTime value corresponding to the lexical representation ‘2001-12-30T11:12:00’