Question: I have a custom View called MyView that inflates its content from XML layout. In the XML I have a TextView whose id is "text". I have 2 MyViews in my Activity. So there are 2 Views with id "text". Which causes problems with Android's implementation of onSaveInstanceState - only one of the TextView's is saved. How to solve this?

Answer: 
```
public class MyTimeStampConverter extends StrutsTypeConverter {
    private static final SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");

    @Override
    public Object convertFromString(Map context, String[] values, Class toClass) throws TypeConversionException {
        try{
               if (values == null || values.length == 0) {
                    return null;
                }
               return new java.sql.Timestamp(sdf.parse(values[0]).getTime());
        }catch(Exception e){        
            throw new TypeConversionException(e);
        }
    }

    @Override
    public String convertToString(Map context, Object object)  throws TypeConversionException  {
        try{
            if(object instanceof Timestamp){
                return sdf.format(new Date(((Timestamp)object).getTime()));
            }
            return "";
        }catch(Exception e){
            throw new TypeConversionException(e);
        }
    }

}

```
Please take a look at  

<https://issues.apache.org/jira/browse/WW-3841>

You can user format date to fix this isse.