Java Timestamp Convert To timeStampToDate(Timestamp tim)

Here you can find the source of timeStampToDate(Timestamp tim)

Description

time Stamp To Date

License

Apache License

Declaration

public static Date timeStampToDate(Timestamp tim) 

Method Source Code


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

import java.sql.Timestamp;

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static Date timeStampToDate(Timestamp tim) {
        return timeStampToCal(tim).getTime();
    }//from   ww  w . j a va2s  . c om

    public static Calendar timeStampToCal(Timestamp tim) {
        if (tim == null) {
            return null;
        }
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(tim);
        return calendar;
    }
}

Related

  1. timeStampToBytes(Timestamp ts)
  2. timestampToCalendar(java.sql.Timestamp inTime)
  3. timestampToCalendar(Timestamp time)
  4. TimestampToDate(Integer time)
  5. timestampToDate(java.sql.Timestamp ts)
  6. timestampToDate(Timestamp tt)
  7. TimestampToDateStr(Timestamp tmp)
  8. timestampToDateString(Timestamp ts)
  9. timestampToDayNumber(long timestamp)