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.


#TechXchangePresenter
 View Only
  • 1.  dateTimeFormat - Invalid Result - Month value is changed

    Posted Thu August 30, 2007 08:09 AM

    dateTimeFormat - Invalid Result - Month value get changed

    I am using BIS “WmPublic/pub.date:dateTimeFormat” to convert new pattern.

    My inputs are–>
    inString = 20070812T200806.000Z
    currentPattern - yyyyMMDD’T’hhmmss.sss’Z’
    newPattern - yyyy-MM-dd HH:mm:ss.S
    locale - en


    Output which i am getting,
    value - 2007-01-12 20:08:00.0


    Problem is, In input month value is 08(auguest) and output is 01(January).
    Month value is changed.

    Can you please clarify this?

    Environment Details : Wm61

    Thanks!
    Arul


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: dateTimeFormat - Invalid Result - Month value is changed

    Posted Thu August 30, 2007 10:43 AM

    yyyyMMDD’T’hhmmss.sss’Z’ ← old
    yyyyMMdd’T’hhmmss.sss’Z’ ← suggested

    You have to change in the currentPattern variable of the service


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: dateTimeFormat - Invalid Result - Month value is changed

    Posted Thu August 30, 2007 11:12 AM

    Thanks a lot !.

    I have changed as per your suggestion. Its coming properly now…


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: dateTimeFormat - Invalid Result - Month value is changed

    Posted Thu August 30, 2007 04:09 PM

    By the way, these two patterns (old and suggested) seem to almost match that of an XML schema dateTime format. However, in order to match that, the patterns would need to be:

     
    yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

    You should also be aware that this form of the XML schema dateTime pattern expresses all dates in GMT or UTC time. Additional logic is needed to parse XML schema dateTimes containing timezone offsets such as the one below which represents Aug 7, 2007 at 8:37 AM in the US Mountain timezone:

     
    2007-08-30T08:37:00.001-06:00

    Mark


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: dateTimeFormat - Invalid Result - Month value is changed

    Posted Sat September 01, 2007 02:59 PM

    Note that: (case sensitive)
    M=month
    m=minute
    dd=date
    ss=seconds
    SS=milliseconds

    All of these are defined in Built-in Services guide.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: dateTimeFormat - Invalid Result - Month value is changed

    Posted Sat September 01, 2007 04:51 PM

    Thanks mcarlson, philk77, prp for your valuable suggestions.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB