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 hh.mm.ss. 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();
idc.first("dateObject");
if(idc.getValue()!=null)
{
Date dateObject=(Date)idc.getValue();
DateFormat df = DateFormat.getDateInstance();
DateFormat format3 = new SimpleDateFormat( "MM/dd/yyyy hh.mm.ss" );
String strDate=format3.format(dateObject);
idc.insertAfter("dateString", strDate);
}
idc.destroy();
}
Input
4/28/2006 12:29:34 IST
Out Put: -
04/28/2006 06.59.34
Please help me lot. Thanks in advances
Regards
Balachandra.k