webMethods

webMethods

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.

 View Only
  • 1.  Date format for timestamp in WebMethods

    Posted Tue May 25, 2021 11:22 AM

    I am trying to create Event Timestamp as per the below format:- 2021-04-05T06:39:33.931-07:00

    I tried using the below pattern for the same: yyyy-MM-dd'T'HH:mm:ss.SSSZZZZ

    Unfortunately, the output is not the same. Below is the output for the same:
    image

    Can you please suggest what should be the correct pattern for this? Below is the code block where I am putting the inputs:-


    #Integration-Server-and-ESB
    #webMethods-io-Integration
    #webMethods


  • 2.  RE: Date format for timestamp in WebMethods

    Posted Tue May 25, 2021 11:59 AM

    Hello Atul,

    Can you try yyyy-MM-dd’T’HH:mm:ss.SSSz as pattern , which will give the below value as the result.

    2021-05-25T15:57:26.199GMT

    Let me if this helps.

    Regards,
    Bharath


    #webMethods-io-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Date format for timestamp in WebMethods

    Posted Tue May 25, 2021 12:08 PM

    I wanted to have the below as an output value:-

    I set the timezone as below and now it is coming as -
    image

    Is there any pattern which can give me the colon in the timezone? Or should I implement it on my own?


    #webMethods
    #webMethods-io-Integration
    #Integration-Server-and-ESB


  • 4.  RE: Date format for timestamp in WebMethods

    Posted Tue May 25, 2021 12:37 PM

    Review the format patterns defined by SimpleDateFormat. You will find what you seek.


    #webMethods-io-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Date format for timestamp in WebMethods

    Posted Wed May 26, 2021 12:55 AM

    Hello Atul,

    timezone field is optional, If you do not specify timezone, the value of the server’s “user timezone” property is used. If this property has not been set, GMT is used.

    you can look for examples :
    https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

    Regards,
    Bharath


    #webMethods-io-Integration
    #webMethods
    #Integration-Server-and-ESB