Java Timestamp SQLTimestampToDate(java.sql.Timestamp ts)

Here you can find the source of SQLTimestampToDate(java.sql.Timestamp ts)

Description

Convert a java.sql.timestamp into a java.util.date

License

LGPL

Parameter

Parameter Description
ts a parameter

Declaration

public static Date SQLTimestampToDate(java.sql.Timestamp ts) 

Method Source Code

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

import java.util.Date;

public class Main {
    /**/*  www  .j a  v a  2  s  .c o m*/
     * Convert a java.sql.timestamp into a java.util.date
     * @param ts
     * @return
     */
    public static Date SQLTimestampToDate(java.sql.Timestamp ts) {
        Date date = new Date(ts.getTime());
        return date;
    }
}

Related

  1. setTimestamp(int index, Timestamp t, PreparedStatement stmt)
  2. setTimestampOrNull(PreparedStatement pstmt, int paramIndex, Timestamp value)
  3. sqlDate(Timestamp t)
  4. sqlDateConvertoStr(Timestamp date)
  5. sqlDateToCalendar(Timestamp date)
  6. sqlTimestampToDate(Timestamp t)
  7. StrToDateTimeFormat(String timestampStr,String pattern)
  8. strToTimestamp(String date)
  9. strToTimestamp(String dateStr)