Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8524

Re: SAP PI -> RFC to JDBC ( error in moni )

$
0
0

Hi

 

Use the following UDF

 

 

public String convertDateTimeToUTC(String strDate, Container container) throws StreamTransformationException{

AbstractTrace trace = container.getTrace();

Date date=null;

SimpleDateFormat sdfSource = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");

try{

String dt = strDate;

date = sdfSource.parse(dt);

trace.addInfo("Local Date:"+date);

SimpleDateFormat sdfDestination = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");

strDate = sdfDestination.format(date);

}

catch(ParseException pe){

trace.addInfo("Parse Exception : " + pe);

}

return strDate;

 

Regards,

Ravi


Viewing all articles
Browse latest Browse all 8524

Trending Articles