List of utility methods to do Parse Date Pattern YYYY
Date | parseInsituFileNameDateFormat(String timeString) parse Insitu File Name Date Format return INSITU_FILE_NAME_DATE_FORMAT.parse(timeString);
|
String | parseLastModifDate(final File file) Parse date with pattern yyyyMMddHHmm. Date date = new Date(file.lastModified()); DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm"); return dateFormat.format(date); |
Date | parseLogstashDate(final String date_string) Parses logstash specific format into a date object, logstash dates look like: 2016-03-24T09:38:03.770000-0400 return formatter.parse(date_string);
|
Date | parsemm(String dateStr) yyyy-MM-dd HH:mm return YYYY_MM_DD_HH_MM_FORMAT.get().parse(dateStr);
|
Date | parseMysql(String s) parse Mysql try { DateFormat fmtTemp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return fmtTemp.parse(s); } catch (ParseException e) { return null; |
Date | parseMysqlDate(String dateStr) Parses a string value into a date vale try { return mysqlDateTimeFormat.parse(dateStr); } catch (ParseException e) { try { return mysqlDateFormat.parse(dateStr); } catch (ParseException e1) { throw new RuntimeException(e); |
Date | parseMySQLDateString(String s) Converts string to a date return parseDateString(s, "yyyy-MM-dd"); |
Date | parseMySQLDateTime(String date) parse My SQL Date Time try { return mySQLDateTimeFormat.parse(date); } catch (ParseException e) { e.printStackTrace(); return null; |
long | parseNanos(final String date) parse Nanos switch (date.length()) { case 8: { synchronized (D8) { return MM * D8.parse(date).getTime(); case 9: { synchronized (D9) { ... |
Date | parseOpenMrsDate(String date) Parses the given string in date format used by OpenMRS to an instance of the Date class. SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); return dateFormat.parse(date); |