I have tried i t.It does not seem to work. This is what I tried
dateFormat=yyyy-MM-dd'T'hh.mm.ss.S'Z'
private java.util.Date formatDate(java.util.Date date)
{
java.util.Date toReturn = null;
SimpleDateFormat formatter = new SimpleDateFormat(dateFormat);
formatter.setTimeZone(TimeZone.getTimeZone(timeZone));
//GregorianCalendar currentTime = new GregorianCalendar(TimeZone.getTimeZone(timeZone));
try
{
System.out.println("Date before Formatting"+date);
String strDate = formatter.format(date);
System.out.println("Date after Formatting1"+strDate);
toReturn = formatter.parse(strDate);
System.out.println("Date after Formatting"+toReturn);
}
catch(Exception e)
{
System.out.println("There is an exception in formatDate");
}
return toReturn;
}