Java Timestamp Format formatTimestamp(Timestamp dataHora)

Here you can find the source of formatTimestamp(Timestamp dataHora)

Description

format Timestamp

License

Open Source License

Declaration

public static String formatTimestamp(Timestamp dataHora) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.Timestamp;

import java.text.SimpleDateFormat;

public class Main {
    public static String formatTimestamp(Timestamp dataHora) {
        if (dataHora == null)
            return "";
        SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
        return format.format(dataHora);
    }/*  ww  w.  j  a v  a2 s.c  o  m*/
}

Related

  1. formatTimestamp(long timestamp)
  2. formatTimestamp(long timestamp)
  3. formatTimestamp(long timestamp)
  4. formatTimestamp(long ts)
  5. formatTimestamp(String dateStr, String granularity)
  6. formatTimeStamp(Timestamp t)
  7. formatTimestamp(Timestamp t, int type)
  8. formatTimestamp(Timestamp timestamp)
  9. formatTimestamp(Timestamp timestamp, int iType)