Android Timestamp Format toSloTime(Timestamp time)

Here you can find the source of toSloTime(Timestamp time)

Description

to Slo Time

Declaration

public static String toSloTime(Timestamp time) 

Method Source Code

//package com.java2s;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static String toSloTime(Timestamp time) {
        if (time == null)
            return "";
        Calendar cal = Calendar.getInstance();
        cal.setTimeInMillis(time.getTime());
        SimpleDateFormat sdf = new SimpleDateFormat("d.M.yyyy H:mm");
        return sdf.format(cal.getTime());
    }/* w w w.  ja v a 2s .co  m*/
}

Related

  1. formatDateTime(Timestamp value)
  2. formatDateTime(Timestamp value, String defaultFormat)
  3. formatShortDate(Timestamp value)
  4. formatShortDate(Timestamp value, String defaultFormat)
  5. timestampToISO8601(Timestamp aTimestamp)