Java SQL Time Create getTimeNumberFromSqlTime(Time time)

Here you can find the source of getTimeNumberFromSqlTime(Time time)

Description

get Time Number From Sql Time

License

Open Source License

Declaration

public static int getTimeNumberFromSqlTime(Time time) 

Method Source Code

//package com.java2s;
import java.sql.Time;

import java.util.Calendar;

public class Main {
    public static int getTimeNumberFromSqlTime(Time time) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(time);/*from   www. j av a 2  s . co m*/
        final int hour = calendar.get(Calendar.HOUR);
        final int minute = calendar.get(Calendar.MINUTE);
        final int second = calendar.get(Calendar.SECOND);
        final int milli = calendar.get(Calendar.MILLISECOND);
        return hour * 60 * 60 * 1000 + minute * 60 * 1000 + second * 1000
                + milli;
    }
}

Related

  1. getTimeBy(int hour)
  2. getTimeFormat()
  3. getTimeFromCalendar(final Calendar calendar)
  4. getTimeList(ResultSet resultSet, String columnName)
  5. getTimeLong(ResultSet resultSet)
  6. getTimesByStr(String dataStr)
  7. getTimeStr(Time time)
  8. getTimeZone(String id)
  9. getTimeZone(String timezone, String time, DateFormat format)