Code example for SimpleDateFormat

Methods: parsetoPattern

0
        getContext().writeQuoted(value != null ? simpleDateFormatter.format(value) : "");
    } 
 
    public Object instantiate(ObjectBinder context, Object value, Type targetType, Class targetClass) {
        try { 
            return simpleDateFormatter.parse( value.toString() );
        } catch (ParseException e) {
            throw new JSONException(String.format( "Failed to parse %s with %s pattern.", value, simpleDateFormatter.toPattern() ), e );
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE