public Date getDate() { return convertTo(Value.DATE).getDate(); }
/** * Returns the value of the specified column as a java.sql.Date. * * @param columnIndex (1,2,...) * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public Date getDate(int columnIndex) throws SQLException { try { debugCodeCall("getDate", columnIndex); return get(columnIndex).getDate(); } catch (Exception e) { throw logAndConvert(e); } }
/** * Returns the value of the specified column as a java.sql.Date. * * @param columnLabel the column label * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public Date getDate(String columnLabel) throws SQLException { try { debugCodeCall("getDate", columnLabel); return get(columnLabel).getDate(); } catch (Exception e) { throw logAndConvert(e); } }
SimpleDateFormat dayName = new SimpleDateFormat( "EEEE", Locale.ENGLISH); result = ValueString.get(dayName.format(v0.getDate()), database.getMode().treatEmptyStringsAsNull); break; result = ValueInt.get(DateTimeUtils.getDatePart(v0.getDate(), Calendar.DAY_OF_MONTH)); break; case DAY_OF_WEEK: result = ValueInt.get(DateTimeUtils.getDatePart(v0.getDate(), Calendar.DAY_OF_WEEK)); break; case DAY_OF_YEAR: result = ValueInt.get(DateTimeUtils.getDatePart(v0.getDate(), Calendar.DAY_OF_YEAR)); break; break; case MONTH: result = ValueInt.get(DateTimeUtils.getDatePart(v0.getDate(), Calendar.MONTH)); break; SimpleDateFormat monthName = new SimpleDateFormat("MMMM", Locale.ENGLISH); result = ValueString.get(monthName.format(v0.getDate()), database.getMode().treatEmptyStringsAsNull); break;