Project

Profile

Help

fn:max(dateTime)

Added by Anonymous about 19 years ago

Legacy ID: #3157768 Legacy Poster: Anantha Krishnan (coolkrishnan)

I want to find the maximum value of a sequence of dateTimes. <max> { fn:max(xs:dateTime($data/time)) } </max> fn:max does not seem to work for dateTime. Any way to do this ? thanks, ananth


Replies (2)

RE: fn:max(dateTime) - Added by Anonymous about 19 years ago

Legacy ID: #3157872 Legacy Poster: Michael Kay (mhkay)

You should be able to apply max() to a sequence of dateTimes, but you cannot create such a sequence by applying the dateTime constructor to a sequence of untyped values. Try max($date/time/xs:dateTime()) which applies the xs:dateTime constructor to each item in $date/time in turn. Michael Kay

RE: fn:max(dateTime) - Added by Anonymous about 19 years ago

Legacy ID: #3159385 Legacy Poster: Anantha Krishnan (coolkrishnan)

Michael, now it works ! great to see your replies coming so fast and accurate ! thanks, ananth

    (1-2/2)

    Please register to reply