import com.oracle.e1.common.OrchestrationAttributes; import java.text.SimpleDateFormat; HashMap < String, Object > main(OrchestrationAttributes orchAttr, HashMap inputMap) { HashMap < String, Object > returnMap = new HashMap < String, Object > (); // Two string inputs passed in, Date and Time String stringDate = (String) inputMap.get("Date"); String stringTime = (String) inputMap.get("Time"); //define the format that the input values are in SimpleDateFormat formatyyyyMMdd = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat formatHHmmss = new SimpleDateFormat("HHmmss"); //define the format that the outputs should be in SimpleDateFormat format = new SimpleDateFormat("EEE, MMM d, yyyy"); SimpleDateFormat formatTime = new SimpleDateFormat("HH:mm:ss"); //format the date and add the result to the return map try { Date dateVal = formatyyyyMMdd.parse(stringDate); String outDate = format.format(dateVal); returnMap.put("outDate", outDate); } catch (Exception e) { returnMap.put("outDate", "Unknown"); } //format the time and add the result to the return map try { Date timeVal = formatHHmmss.parse(stringTime); String outTime = formatTime.format(timeVal); returnMap.put("outTime", outTime); } catch (Exception e) { returnMap.put("outTime", "Unknown"); } return returnMap; }