Java Timestamp getTimeString(java.sql.Timestamp ts)

Here you can find the source of getTimeString(java.sql.Timestamp ts)

Description

get Time String

License

Open Source License

Declaration

public static String getTimeString(java.sql.Timestamp ts) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getTimeString(java.sql.Timestamp ts) {
        java.util.Calendar calendar = java.util.Calendar.getInstance();
        calendar.setTime(new java.util.Date(ts.getTime()));
        return calendar.get(calendar.HOUR_OF_DAY) + ":" + calendar.get(calendar.MINUTE) + ":"
                + calendar.get(calendar.SECOND);
    }//from w  w w .  j  a  v a 2  s.  c  o  m
}

Related

  1. getTimeNanoSec(Timestamp t)
  2. getTimeNextDay(Timestamp date)
  3. getTimeNextMonthFirstSec(Timestamp sysDate)
  4. getTimePassedSince(Timestamp timestamp)
  5. getTimeStr(Timestamp tsp)
  6. getTimeString(Timestamp timestamp)
  7. getTodayTimestamp()
  8. getUtilDate(java.sql.Timestamp time)
  9. getValue(Timestamp t)