How to convert string to object

hi
i am new to webMethods, how to convert string to object
problem is date is in string format and input field for adapter service is object we are using oracleapps adapter.u guys have any java code ??

thanks
sagi

You can download “WmTransformation Services Package” from the Advantage site, which would be useful for all such kind of Transformations. Also otherwise look into the WmPubic Package for such kind of utilties.

There are two different ways to do it:

  1. In the Adapter service accept the date as string and use to_date function like this to_date(‘dd/mm/yyyy’., ?)

You might want to do this.

  1. Use the wmpubic datebuild service. PSUtilities has some date services.

the java code is simple:

Create a SimpleDateformat object with the format of the date.
SimpleDateFormat df = new SimpleDateFormat (“yyyy-MM-dd”)
Date d= df.parse(inputDate);
this should return you a date.