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 & Time

    Posted 01/21/02 06:01 PM

    I have a XML doc with date/time attributes. This date/time is decript with the millisecond since 1970. How can I transform this date/time attribute (Integer value) to reading (HTML) string by example ‘21.Jan 2002’


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: Date & Time

    Posted 01/22/02 01:39 PM

    If you know the algorithm for converting from “milliseconds since 1970” to “yyyy-mm-dd” format, then you can probably code that algorithm in XSLT. But it’s probably simpler here to use an extension function, that is, a function written in a different language. The precise way in which you do this varies from one XSLT processor to another. If you’re using MSXML3 you can easily call JavaScript routines, if you’re using Saxon or Xalan you can call methods in Java classes. Look in the documentation for your specific product.

    By the way, if you have any influence over the design of the XML document, it’s probably best to encode date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss) as that’s what XML Schema supports. This means that future specifications like XQuery and XSLT 2.0 will provide date and time arithmetic functions, provided you use that format.

    Mike Kay


    #Tamino
    #webMethods
    #API-Management