Java Timestamp getUtilDate(java.sql.Timestamp time)

Here you can find the source of getUtilDate(java.sql.Timestamp time)

Description

Convert SQL timestamp to Java Date

License

Apache License

Parameter

Parameter Description
time the timestamp to concert

Return

the time in util date

Declaration

public static java.util.Date getUtilDate(java.sql.Timestamp time) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//  w ww . ja va 2  s  .  co m
     * Convert SQL timestamp to Java Date
     * @param time the timestamp to concert
     * @return the time in util date
     */
    public static java.util.Date getUtilDate(java.sql.Timestamp time) {
        if (time != null)
            return new java.util.Date(time.getTime());
        else
            return null;
    }
}

Related

  1. getTimePassedSince(Timestamp timestamp)
  2. getTimeStr(Timestamp tsp)
  3. getTimeString(java.sql.Timestamp ts)
  4. getTimeString(Timestamp timestamp)
  5. getTodayTimestamp()
  6. getValue(Timestamp t)
  7. getZonedDateTime(final Timestamp timestamp)
  8. hasTimeExpired(Timestamp referenceTime)
  9. inRange(Timestamp start, Timestamp end, boolean OnMonday, boolean OnTuesday, boolean OnWednesday, boolean OnThursday, boolean OnFriday, boolean OnSaturday, boolean OnSunday)