[xquery-talk] [Dumbo question] allow us to add four minutes to a time

Geert Josten geert.josten at dayon.nl
Wed Mar 7 22:58:18 PST 2012

Hi Jidanni,

The approach sounds right. The trick is to use dayTimeDurations to add the
4 minutes. You can do that like this:

xs:time("12:34:00") + xs:dayTimeDuration("PT4M")

Kind regards,

> -----Oorspronkelijk bericht-----
> Van: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] Namens
> jidanni at jidanni.org
> Verzonden: donderdag 8 maart 2012 4:09
> Aan: talk at x-query.com
> Onderwerp: [xquery-talk] [Dumbo question] allow us to add four minutes
to a
> time
> Dear Sirs, Gentlemen,
> Let us add four minutes to a time.
> let $a:="12:34", $b:=4
> How do I return "12:38"?
> The bus will go by my house 38 minutes past noon.
> The documentation is so hard to search through.
> OK, first I must apparently append :00 to the time,
> then convert the type,
> then surround the 4 with P...
> then convert its type,
> then add them together,
> then convert the result back into a string,
> is that so?
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk

More information about the talk mailing list