[xquery-talk] Date Arithmetic

Michael Kay mhk at mhk.me.uk
Fri Oct 3 00:30:38 PDT 2003


See:

http://www.w3.org/TR/xpath-functions/#func-subtract-dateTimes-yielding-d
ayTimeDuration

http://www.w3.org/TR/xpath-functions/#func-subtract-dateTimes-yielding-y
earMonthDuration

But don't necessarily expect to find these functions implemented; this
area of the spec hasn't been all that stable between drafts.

Michael Kay

> -----Original Message-----
> From: talk-bounces at xquery.com 
> [mailto:talk-bounces at xquery.com] On Behalf Of john.zink at prudential.com
> Sent: 02 October 2003 19:34
> To: talk at xquery.com
> Subject: [xquery-talk] Date Arithmetic
> 
> 
> I need the ability to compare 2 dates and be able to specify 
> if the results are returned in months or days. Is there a 
> built-in XQuery function that can perform this type of arithmetic.
> 
> For example:
> 
> 10-31-2003  -  10-01-2003 = 30 days
> 10-31-2003 -  8-01-2003 = 2 months
> 
> 
> _______________________________________________
> talk at xquery.com
> http://www.x-query.com/mailman/listinfo/talk
> 



More information about the talk mailing list