Java Utililty Methods Timestamp Format

List of utility methods to do Timestamp Format

Description

The list of methods to do Timestamp Format are organized into topic(s).

Method

StringformatDataTime(Timestamp intime)
format Data Time
final String DATE_FORMATE = "yyyy-MM-dd HH:mm:ss";
DateFormat df = new SimpleDateFormat(DATE_FORMATE);
return df.format(intime);
StringformatDate(Date date, String pattern)
Methods Descrip:
if (pattern == null || pattern.equals("") || pattern.equals("null")) {
    pattern = "yyyy-MM-dd";
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(pattern);
return sdf.format(date);
StringformatDate(Date date, String pattern)
Format date.
if (date == null) {
    return "";
if (pattern == null) {
    pattern = "yyyy-MM-dd";
SimpleDateFormat sdf = new SimpleDateFormat(pattern, enLocale);
return sdf.format(date);
...
StringformatDate(java.sql.Timestamp timestamp)
Formats a String timestamp into a nice string
if (timestamp == null)
    return "";
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.FULL);
java.util.Date date = timestamp;
return df.format(date);
StringformatDate(java.util.Date d)
format Date
SimpleDateFormat myDateFormat = ISO_DATE_FORMATS.get();
if (myDateFormat == null) {
    myDateFormat = new SimpleDateFormat(isoDatePattern);
    ISO_DATE_FORMATS.set(myDateFormat);
return myDateFormat.format(d);
StringformatDate(java.util.Date date)
This method converts a JDBC format date into a String
if (date == null)
    return null;
return userDateFmt.format(date);
StringformatDate(Timestamp date)
Date formater using Sitemaps standard
return _formater.format(date);
StringformatDate(Timestamp time)
format Date
return formatDate(new java.util.Date(time.getTime()));
StringformatDate(Timestamp time, String pattern)
Formats as a String the specified time.
if (time == null)
    time = getDefaultTimestamp();
if (pattern == null || pattern.length() == 0)
    pattern = WDMY_FORMAT;
DateFormat df;
if (WDMY_FORMAT.equals(pattern))
    df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.LONG, Locale.getDefault());
else
...
StringformatDate(Timestamp timestamp)
format Date
SimpleDateFormat sdf = new SimpleDateFormat(DATE_PATTERN);
return sdf.format(timestamp);