IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Date query in XQuery

    Posted 09/09/03 02:25 PM

    Can I compare an element (type xs:date) to being greater than a variable? My query looks like this:
    for $q in input()/PeriodControl
    where $q/FromDate > ‘2001-01-01’
    return $q
    I have tried various ways of specifying the date, but haven’t yet hit on the right one.
    If this is not possible, what type would you recommend we use for storing a date?


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Date query in XQuery

    Posted 09/10/03 11:29 AM

    Have you tried:-

    where $q/FromDate > xs:date(“2001-01-01”)


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: Date query in XQuery

    Posted 09/10/03 02:08 PM

    Thanks, Mike - works like a charm - I had to declare the namespace first. So my full XQuery is:

    declare namespace xs=“XML Schema
    for $q in input()/PeriodControl
    where $q/FromDate > xs:date(“2001-01-01”)
    return $q


    #API-Management
    #webMethods
    #Tamino