List of utility methods to do SQL Date Parse
String | parseDateYYMMddHHmm(java.util.Date date) parse Date YYM Mdd H Hmm return new SimpleDateFormat(DATE_FORMAT_yyMMddHHmm).format(date); |
String | parseDateYYMMddHHmmss1(Date date) Parse a java.sql.Date to String return new SimpleDateFormat(DATE_FORMAT_yyMMddHHmmss).format(date); |
Date | parseDateyyyy_MM_DD(String ds) parse DateyyyMDD return new Date(new SimpleDateFormat(DATE_FORMAT_yyyy_MM_dd).parse(ds).getTime()); |
java.sql.Date | parseSqlDate(final String value) parse Sql Date try { return new java.sql.Date(getSqlDateFormat().parse(value).getTime()); } catch (ParseException e) { return throwRuntimeParseException(value, e); |
java.sql.Date | parseSqlDate(final String value) parse Sql Date try { return java.sql.Date.valueOf(value); } catch (IllegalArgumentException e) { return throwRuntimeParseException(value, new ParseException(value, 0), SQL_DATE_FORMAT); |
java.sql.Date | parseSqlDate(java.util.Date date) parse Sql Date if (date == null) return null; return new java.sql.Date(date.getTime()); |
java.sql.Date | parseSqlDate(java.util.Date date) parse Sql Date if (date != null) { return new java.sql.Date(date.getTime()); } else { return null; |
java.sql.Date | parseSQLDate(String dateStr, String pattern) parse SQL Date Date d = parse(dateStr, pattern); return new java.sql.Date(d.getTime()); |
java.sql.Date | parseString2Date(String s, SimpleDateFormat format) parse String Date java.sql.Date date = null; try { date = new java.sql.Date(format.parse(s).getTime()); } catch (ParseException e) { return date; |
java.sql.Timestamp | parseUTCDateFromString(String dt) Translates a string of the form yyyyMMddHHmmss (UTC) into asql Date, and returns that date. if (dt == null) return null; SimpleDateFormat utcDateFormat = (dt.length() > 8) ? new SimpleDateFormat("yyyyMMddHHmmss") : new SimpleDateFormat("yyyyMMdd"); java.util.Date pdate = utcDateFormat.parse(dt); return new java.sql.Timestamp(pdate.getTime()); |