Java Timestamp to Calendar getCalendar(Timestamp timestamp)

Here you can find the source of getCalendar(Timestamp timestamp)

Description

get Calendar

License

Open Source License

Declaration

public static Calendar getCalendar(Timestamp timestamp) 

Method Source Code


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

import java.sql.Timestamp;
import java.util.Calendar;

public class Main {
    public static Calendar getCalendar(Timestamp timestamp) {
        Calendar cal = null;/*w w  w. j  ava 2  s.  c  o m*/
        if (timestamp != null) {
            cal = Calendar.getInstance();
            cal.setTimeInMillis(timestamp.getTime());
        }
        return cal;
    }
}

Related

  1. getCalendarFromTimeStamp(Timestamp t)
  2. getCalendarModel(java.sql.Timestamp date)
  3. getCalendarOfTimestamp( java.sql.Timestamp tTimestamp, Locale locale)