Java Timestamp Format formatDataTime(Timestamp intime)

Here you can find the source of formatDataTime(Timestamp intime)

Description

format Data Time

License

Apache License

Declaration

public static String formatDataTime(Timestamp intime) 

Method Source Code

//package com.java2s;
/*/*w ww . j  a  v  a 2 s  .  c o  m*/
 * Copyright (c) 2014. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class Main {
    public static String formatDataTime(Timestamp intime) {
        final String DATE_FORMATE = "yyyy-MM-dd HH:mm:ss";
        DateFormat df = new SimpleDateFormat(DATE_FORMATE);
        return df.format(intime);
    }
}

Related

  1. format2AdwordsTimestamp(Date date)
  2. format8chars(long timestamp)
  3. formataDataHoraMinuto(Timestamp dataHora)
  4. formatCalendar(Timestamp stamp)
  5. formatCurrentDateTimeStamp(final String dateFormatString)
  6. formatDate(Date date, String pattern)
  7. formatDate(Date date, String pattern)
  8. formatDate(java.sql.Timestamp timestamp)
  9. formatDate(java.util.Date d)