Java SQL Time sqlDateTimeAdd(java.util.Date date, long milliseconds)

Here you can find the source of sqlDateTimeAdd(java.util.Date date, long milliseconds)

Description

sql Date Time Add

License

Open Source License

Declaration

public static java.sql.Timestamp sqlDateTimeAdd(java.util.Date date, long milliseconds) 

Method Source Code

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

public class Main {

    public static java.sql.Timestamp sqlDateTimeAdd(java.util.Date date, long milliseconds) {
        long ct;//  w  w w  . ja  v  a 2 s .  c  o m
        if (date == null) {
            ct = System.currentTimeMillis();
        } else {
            ct = date.getTime();
        }
        return new java.sql.Timestamp(ct + milliseconds);
    }
}

Related

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