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