Java SQL Time sqlTime()

Here you can find the source of sqlTime()

Description

sql Time

License

Open Source License

Declaration

public static java.sql.Time sqlTime() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Date;

public class Main {
    public static java.sql.Time sqlTime() {
        return sqlTime(null);
    }/* w ww. ja  v a  2s. c  o m*/

    public static java.sql.Time sqlTime(java.util.Date date) {
        if (date != null) {
            return new java.sql.Time(date.getTime());
        }
        return new java.sql.Time(now().getTime());
    }

    public static java.util.Date now() {
        return new Date();
    }
}

Related

  1. saveGameScores(String gameName, String player1, String player2, String player3, String player4, short score1, short score2, short score3, short score4, java.util.Date startTime)
  2. serialize(LocalDateTime date)
  3. serializeSqlTime(Time time)
  4. setTime(PreparedStatement statement, int index, Date value)
  5. sqlDateTimeAdd(java.util.Date date, long milliseconds)
  6. str2dateTime(String handedate)
  7. StrToDateTime(String val)
  8. strToTime(String strDate)
  9. toDate(TimeZone tz, int days)