Date formate java program (IST to GMT)

Dear friends,

This is a java program, where is accept date coming from outside. I am converting date object to string to specific date format MM/dd/yyyy Date coming from out is 4/28/2006 12:29:34 IST format but it is giving the result in different format. 04/28/2006 06.59.34
I need to know why this time is getting converted.
How to get that same time. 4/28/2006 12:29:34 IST

Public static void main(IDATAPIPELINE)throws ServerException 
IDataCursor idc = pipeline.getCursor();
                  Date dateObject=(Date)idc.getValue();
                  DateFormat df =  DateFormat.getDateInstance();
DateFormat format3 = new SimpleDateFormat( "MM/dd/yyyy" );
                  String strDate=format3.format(dateObject);
  idc.insertAfter("dateString", strDate);





4/28/2006 12:29:34 IST

Out Put: -

04/28/2006 06.59.34

Please help me lot. Thanks in advances



Why are you doing this in a java service? Try the built-in service instead.


exactly , the date format service is available in transformers. why dont u use that .

Your pattern string “MM/dd/yyyy” is not correct for the output you want. Research the pattern strings for the that Mark mentions above (page 66 in the Built-in Services guide for 6.1).