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
Expand all | Collapse all

StringToDate with yyyyMMdd hh:mm:ss format

  • 1.  StringToDate with yyyyMMdd hh:mm:ss format

    Posted Thu October 03, 2002 04:36 PM

    I want to convert a string into a Date using StringToDate service in IS. The problem is that this service fills in only the year, month and day but not the hour, minute, and second. Does anybody know how to get the Date with a full format or know of another service that does it.

    Thanks in advance.

    Nour.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: StringToDate with yyyyMMdd hh:mm:ss format

    Posted Sun October 06, 2002 06:33 AM

    Are you saying that you want the service to return a Java Date object, based on a String as input? AFAIK, there is no such service unless it has been custom built. Also, I can’t find a service called StringToDate.

    If all you need is to reformat a date from say MMddyy hh:mm:ss to yyyyMMdd hh:mm:ss you can use the built-in pub.date:dateTimeFormat. If you need to get a Java Date object you will have to build a Java service to do the job.


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 3.  RE: StringToDate with yyyyMMdd hh:mm:ss format

    Posted Tue October 08, 2002 09:20 AM

    Kristoffer,

    Thanks for your answer. Yes there is a wm.enterprise.BuiltInUtil:StringToDate service in IS. I didn’t have to write a custom Java code to have a Date Object. INstead, I created a custom SQL code in EAI using TO_DATE command to convert my string into a date and it seems to be working.


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB