Class to parse Siebel datetime format into XML standard format.
Another useful POJO to add to your OSBToolkit.java.
public class OSBToolkit
{
public OSBToolkit()
{
}
public static Date convertSiebelDateTimeToXML(String dateString) {
Date stringDate = null;
try
{ //If dateTime
if(dateString.trim().length() > 10)
{
stringDate = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").parse(dateString);
}// If just a date
else if(dateString.trim().length() > 0)
{
stringDate = new SimpleDateFormat("MM/dd/yyyy").parse(dateString);
}
}
catch(Exception e)
{
e.printStackTrace();
}
return stringDate;
}
public static String convertXMLToSiebelDate(Date date) {
String formattedDate ="";
if(date != null)
{
SimpleDateFormat format =
new SimpleDateFormat("MM/dd/yyyy");
formattedDate = format.format(date);
}
else
{
}
return formattedDate;
}
}
Monday, July 21, 2014
Topics
- 12c (1)
- Architecture (2)
- B2B (1)
- Banking (1)
- BPEL (3)
- Cisco (1)
- ebXML (1)
- EDIFACT (1)
- Effective Management (2)
- Engineered Systems (2)
- Exadata (2)
- Exalogic (1)
- Governance (1)
- Innovative (1)
- Issue Management (1)
- ITIL (1)
- Java (3)
- JDeveloper (2)
- Methods (27)
- Mobility (1)
- OFM (5)
- OIC (1)
- Oracle SOA Suite (7)
- OSB (1)
- Principles (8)
- Release Management (1)
- Scripting (1)
- Standards (3)
- Virtualization (1)
- webMethods (6)
- XPath (1)