Java Timestamp to String timestampToStringFF(Timestamp date)

Here you can find the source of timestampToStringFF(Timestamp date)

Description

[timestampToStringFF function.].
[Detail description of method.]

License

Open Source License

Parameter

Parameter Description
date Timestamp

Return

String

Declaration

public static String timestampToStringFF(Timestamp date) 

Method Source Code


//package com.java2s;
/*/*from w  w w  . j  a  va 2 s  .c o  m*/
 * Copyright (C) 2010 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.sql.Timestamp;

import java.text.SimpleDateFormat;

public class Main {
    /**
     * [timestampToStringFF function.].<br>
     * [Detail description of method.]
     *
     * @param date Timestamp
     * @return String
     */
    public static String timestampToStringFF(Timestamp date) {
        if (date != null) {
            SimpleDateFormat dbDateTimeString = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
            return dbDateTimeString.format(date);
        }
        return "";
    }
}

Related

  1. timestampToString(Timestamp timestamp)
  2. timestampToString(Timestamp timestamp)
  3. timestampToString(Timestamp timestamp, String pattern)
  4. timestampToString(Timestamp ts)
  5. timestampToString(Timestamp ts, Calendar cal)
  6. timestampToUTC(Timestamp marcTimestamp)
  7. toString(Timestamp t, String precision)
  8. toString(Timestamp value)
  9. toStringFormatGMTTime(Timestamp time, String format)