List of utility methods to do Timestamp to String
String | timeStampToString(Timestamp stamp, String dateTimeFormat, TimeZone tz, Locale locale) Localized Timestamp to String conversion. DateFormat dateFormat = toDateTimeFormat(dateTimeFormat, tz, locale);
dateFormat.setTimeZone(tz);
return dateFormat.format(stamp);
|
String | timestampToString(Timestamp timestamp) timestamp To String if (timestamp == null) { return null; return timeFormatter().format(timestamp); |
String | timestampToString(Timestamp timestamp) timestamp To String SimpleDateFormat dateFormatForJqplotGraphs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return dateFormatForJqplotGraphs.format(new Date(timestamp.getTime())); |
String | timestampToString(Timestamp timestamp, String pattern) timestamp To String SimpleDateFormat simpledateformat = new SimpleDateFormat(pattern); return simpledateformat.format(timestamp); |
String | timestampToString(Timestamp ts) Conversion setting to 0 the nanoseconds, to deal with the mysql driver bug affecting the reverse translation (see stringToTimestamp()). ts.setNanos(0);
return ts.toString();
|
String | timestampToString(Timestamp ts, Calendar cal) Formats a timestamp in JDBC timestamp escape format using the timezone of the passed Calendar. cal.setTime(ts); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; int day = cal.get(Calendar.DATE); int hour = cal.get(Calendar.HOUR_OF_DAY); int minute = cal.get(Calendar.MINUTE); int second = cal.get(Calendar.SECOND); String yearString = Integer.toString(year); ... |
String | timestampToStringFF(Timestamp date) [timestampToStringFF function.]. [Detail description of method.] if (date != null) { SimpleDateFormat dbDateTimeString = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); return dbDateTimeString.format(date); return ""; |
String | timestampToUTC(Timestamp marcTimestamp) Convert a java.sql.Timestamp object (come from the database) to string in UTCdatetime format "yyyy-MM-dd'T'HH:mm:ssZ" format if (null == marcTimestamp) { return "no timestamp"; } else { return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(marcTimestamp); |
String | toString(Timestamp t, String precision) to String if (t == null) return null; SimpleDateFormat sdf; if (precision.equals("minute")) sdf = new SimpleDateFormat(MINUTE_FORMAT); else if (precision.equals("hour")) sdf = new SimpleDateFormat(HOUR_FORMAT); else if (precision.equals("day")) ... |
String | toString(Timestamp value) to String String result = null; if (value != null) { try { result = value.toString(); } catch (Exception ex) { return result; ... |