Java Timestamp to String timestampToString(Timestamp timestamp)

Here you can find the source of timestampToString(Timestamp timestamp)

Description

timestamp To String

License

Open Source License

Declaration

public static String timestampToString(Timestamp timestamp) 

Method Source Code

//package com.java2s;
// This software may not be used, sold, licensed, transferred, copied

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String timestampToString(Timestamp timestamp) {
        SimpleDateFormat dateFormatForJqplotGraphs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return dateFormatForJqplotGraphs.format(new Date(timestamp.getTime()));
    }//  w  w w.j a  va  2  s  . com
}

Related

  1. timestampToString(long timestamp)
  2. timestampToString(long timestamp)
  3. timeStampToString(Timestamp date, String dateFmt)
  4. timestampToString(Timestamp now, String pattern)
  5. timeStampToString(Timestamp stamp, String dateTimeFormat, TimeZone tz, Locale locale)
  6. timestampToString(Timestamp timestamp)
  7. timestampToString(Timestamp timestamp, String pattern)
  8. timestampToString(Timestamp ts)
  9. timestampToString(Timestamp ts, Calendar cal)