[xquery-talk] get-duration

Florent Georges darkman_spam at yahoo.fr
Tue May 30 15:02:58 PDT 2006

Craig Stanton wrote:

> Now that I have dateTime objects I'd like to work out the
> difference between them.

  Just use the usual difference operator:

      - xs:dateTime("2006-05-29T13:38:00")
       ==> P1D

> I've found get-duration() but I can't work out how to use
> it in my query.

> I thought I could declare a name space like this

> declare namespace op ="http://www.w3.org/2001/12/xquery-operators";

> And then use the function like this

> let $dur := op:get-duration($startTime, $endTime)

> But it complains about the function not being defined

  The functions used to define the operators are not usable
by the user.  Not by name.  But the same semantics can be
accessed via the several operators, as stated in §B.2,
"Operator Mapping", in the XQuery CR.




Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel. 
Rendez-vous sur http://fr.yahoo.com/set

More information about the talk mailing list