Java SQL Time getCalTime(Time startTime, Calendar cal)

Here you can find the source of getCalTime(Time startTime, Calendar cal)

Description

get Cal Time

License

Open Source License

Declaration

public static void getCalTime(Time startTime, Calendar cal) 

Method Source Code

//package com.java2s;

import java.sql.Time;

import java.util.*;

public class Main {
    public static void getCalTime(Time startTime, Calendar cal) {
        int year = cal.get(Calendar.YEAR);
        int month = cal.get(Calendar.MONTH);
        int day = cal.get(Calendar.DAY_OF_MONTH);
        cal.setTime(startTime);//w ww. ja v a  2s  .  c  om
        int hour = cal.get(Calendar.HOUR_OF_DAY);
        int min = cal.get(Calendar.MINUTE);
        int sec = cal.get(Calendar.SECOND);
        cal.set(year, month, day, hour, min, sec);
    }
}

Related

  1. daytime()
  2. deserializeSqlTime(String text)
  3. double2Time(Number zahl)
  4. equalsTime(Time time1, Time time2)
  5. extractTime(Date date)
  6. getClassForSqlType(String sqlType, Class dateTimeClass)
  7. getClosestIDByTime(Connection con, String table, long time)
  8. getDateTimeValue(ResultSet result, String strField, String strDateFormat)
  9. getDBTime(String yyyyMMddHHmmss)