Java Timestamp Convert To timestampToCalendar(java.sql.Timestamp inTime)

Here you can find the source of timestampToCalendar(java.sql.Timestamp inTime)

Description

Returns Calendar converted from Timestamp.

License

Open Source License

Parameter

Parameter Description
inTime Source timestamp which to be converted.

Return

Calendar object which converted from input.

Declaration

public static java.util.Calendar timestampToCalendar(java.sql.Timestamp inTime) 

Method Source Code

//package com.java2s;
/*//from w w w  .  j av a  2 s .c om
* @(#)Utility.java
*
* Copyright (c) 2003 DCIVision Ltd
* All rights reserved.
*
* This software is the confidential and proprietary information of DCIVision
* Ltd ("Confidential Information").  You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the license
* agreement you entered into with DCIVision Ltd.
 */

public class Main {
    /**
     * Returns Calendar converted from Timestamp.
     *
     * @param   inTime Source timestamp which to be converted.
     * @return  Calendar object which converted from input.
     */
    public static java.util.Calendar timestampToCalendar(java.sql.Timestamp inTime) {
        if (inTime == null) {
            return (null);
        }
        java.util.Calendar cal = java.util.Calendar.getInstance();
        cal.setTime(inTime);
        return (cal);
    }
}

Related

  1. timestamp2Internal(java.sql.Timestamp t)
  2. timestamp2ToTimestamp(long seconds, int fraction, int width)
  3. timestampSqlToDate(Timestamp timestamp)
  4. TimestampToBigint(String timestamp)
  5. timeStampToBytes(Timestamp ts)
  6. timestampToCalendar(Timestamp time)
  7. TimestampToDate(Integer time)
  8. timestampToDate(java.sql.Timestamp ts)
  9. timeStampToDate(Timestamp tim)