Code example for SimpleDateFormat

Methods: clone

0
    } 
    if (o instanceof Timestamp == false)
    { 
      throw new BeanException("Failed to convert object of type " + o.getClass() + ": Not a SQL-Timestamp.");
    } 
    final DateFormat format = (DateFormat) dateFormat.clone();
    return format.format((Timestamp) o);
  } 
 
  public Object toPropertyValue(final String s) throws BeanException
  { 
    if (s == null)
    { 
      throw new NullPointerException();
    } 
    try 
    { 
      final DateFormat format = (DateFormat) dateFormat.clone();
      final java.util.Date date = format.parse(s);
      return new Timestamp(date.getTime());
    }