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.  Substract time

    Posted 09/22/10 08:57 AM

    Hi all,

    Could You, please, tell me how I can substract or add two variables in format HH:mm:ss (time)? That it would be correct…
    Now I am doing:
    Time → “tokenize” delim( : ) → TimeList
    Time2 → “tokenize” delim( : ) → TimeList2

    Substract Ints: TimeList[0]-TimeList2[0], …[1]-…[1], …[2]-…[2] = result Time. But I don’t think this one correct.

    Thank You for all information,


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


  • 2.  RE: Substract time

    Posted 09/22/10 01:25 PM

    Hi, did you try with PSUtilities.date:calculateDateDifference service? Maybe this service be useful for you.
    Regards.


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


  • 3.  RE: Substract time

    Posted 09/22/10 03:14 PM

    Either use the above suggested psutilities service or write your own piece of java code, its quite easy to achive time substraction/addition in java.


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


  • 4.  RE: Substract time

    Posted 09/22/10 03:33 PM

    Hi,
    I just want to wrote. Sorry, only now I found Your answers.
    So, I wrote by myself - not in Java, but in webMethods.

    Service:

    1. Two times at input;
    2. Tokenize both to HH, mm, ss;
    3. Substract each part;
    4. Branch if ss or mm with “-”;
    5. Concat theese parts with " : ".

    CAS975
    Thanks for Your help - I think I should try this service. Just for my knowledge :slight_smile:


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