Facing Problem With Max()
Hi, I am trying to get max value for a sequence of nodes using max(). I have a query which gives me a set of element and after that i get its max value. let $elements := (<date>10-02-2012</date>,<date>12-02-2012<date>); return max($element) I am expecting that it gives me 10-02-2012, while it is giving error "cannot cast to double '10-02-2012'. Thanks Ankit
Hi Ankit, Please see the spec for more information: http://www.w3.org/TR/xpath-functions-31/#func-max Best, Christian On Wed, Mar 25, 2015 at 3:44 PM, ankit kumar <anky4bugs@gmail.com> wrote:
Hi,
I am trying to get max value for a sequence of nodes using max(). I have a query which gives me a set of element and after that i get its max value.
let $elements := (<date>10-02-2012</date>,<date>12-02-2012<date>); return max($element)
I am expecting that it gives me 10-02-2012, while it is giving error "cannot cast to double '10-02-2012'.
Thanks Ankit
participants (2)
-
ankit kumar -
Christian Grün