Java Timestamp sqlTimestampToDate(Timestamp t)

Here you can find the source of sqlTimestampToDate(Timestamp t)

Description

sql Timestamp To Date

License

Apache License

Declaration

public static java.util.Date sqlTimestampToDate(Timestamp t) 

Method Source Code

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

import java.sql.Timestamp;

public class Main {
    public static java.util.Date sqlTimestampToDate(Timestamp t) {

        return t != null ? new java.util.Date(Math.round(t.getTime() + t.getNanos() / 1000000D)) : null;
    }/*from   w w  w  . j a va  2  s.  co  m*/
}

Related

  1. setTimestampOrNull(PreparedStatement pstmt, int paramIndex, Timestamp value)
  2. sqlDate(Timestamp t)
  3. sqlDateConvertoStr(Timestamp date)
  4. sqlDateToCalendar(Timestamp date)
  5. SQLTimestampToDate(java.sql.Timestamp ts)
  6. StrToDateTimeFormat(String timestampStr,String pattern)
  7. strToTimestamp(String date)
  8. strToTimestamp(String dateStr)
  9. strToTimestamp(String i_Today, String i_Hour, String i_Minute)