/** * Renders the provided {@link Date} instance as a DATETIME literal * in the database-specific format. The return value should <i>not</i> * be enclosed within quotes, as this is accomplished within other * functions when rendering is required. This method is actually a * boiler-plate usage of the {@link SimpleDateFormat} class, using the * date format defined within the {@link #getDateFormat()} method. * * @param date The time instance to be rendered. * @return The database-specific String representation of the time. */ protected String renderDate(Date date) { return new SimpleDateFormat(getDateFormat()).format(date); }
/** * Renders the provided {@link Date} instance as a DATETIME literal * in the database-specific format. The return value should <i>not</i> * be enclosed within quotes, as this is accomplished within other * functions when rendering is required. This method is actually a * boiler-plate usage of the {@link SimpleDateFormat} class, using the * date format defined within the {@link #getDateFormat()} method. * * @param date The time instance to be rendered. * @return The database-specific String representation of the time. */ protected String renderDate(Date date) { return new SimpleDateFormat(getDateFormat()).format(date); }
return new SimpleDateFormat(getDateFormat()).parse(value); } catch (ParseException e) { return null; return new SimpleDateFormat(getDateFormat()).parse(value); } catch (ParseException e) { return null;
return new SimpleDateFormat(getDateFormat()).parse(value); } catch (ParseException e) { return null; return new SimpleDateFormat(getDateFormat()).parse(value); } catch (ParseException e) { return null;