List of utility methods to do Hour Format
long | formatStringTimeToLong(String timeLine) format String Time To Long long time = -1L; SimpleDateFormat format = new SimpleDateFormat(FROMAT); try { time = format.parse(timeLine).getTime(); } catch (ParseException e) { e.printStackTrace(); return time; ... |
java.util.Date | formatStrToDate(String strDate, int format) format Str To Date java.util.Date rel = null; if (strDate != null && !strDate.equals("")) { if (format >= DATE_FORMATTER.length || format < 0) { format = 0; try { rel = DATE_FORMATTER[format].parse(strDate); } catch (ParseException e) { ... |
java.util.Date | formatStrToDate(String value, String pattern) format Str To Date java.text.SimpleDateFormat format = null; if (null == pattern) { format = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } else { format = new java.text.SimpleDateFormat(pattern); try { return format.parse(value); ... |
String | formattedDate() formatted Date return toTimestamp(new Date()); |
String | formattedDate(java.util.Date date, String formatString) Formats the System date in the order determined by the formatString SimpleDateFormat format; format = (SimpleDateFormat) formats.get(formatString); if (format == null) { format = new SimpleDateFormat(formatString); formats.put(formatString, format); return format.format(date); |
java.util.Date | formattedDateToDate(String str) Returns a Date object parsed from the date-time string formatted in accordance with RFC 822. java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", java.util.Locale.US); java.text.ParsePosition pos = new java.text.ParsePosition(0); try { return (df.parse(str, pos)); } catch (Exception ignore) { return (null); |
Date | formattedStringToDate(String date) Converts a String that represents a Date with the format of DATEPATTERN into a Date-Object SimpleDateFormat formatter = new SimpleDateFormat(DATEPATTERN); try { return formatter.parse(date); } catch (ParseException e) { e.printStackTrace(); return null; |
String | formattedTime(long epochTime) Member Functions return siriDateTimeFormat.format(new Date(epochTime)); |
String | formattedTimeForFilenames() formatted Time For Filenames SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss"); return sdf.format(new Date()); |
String | formatterDate(Date date, byte format) This method formats a date using the Brazilian convention if (date == null) { return ""; SimpleDateFormat simpleDateFormat; switch (format) { case 1: simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); break; ... |