Java Timestamp date2Timestamp(Date value)

Here you can find the source of date2Timestamp(Date value)

Description

date Timestamp

License

Open Source License

Parameter

Parameter Description
value Date

Return

Timestamp

Declaration

public static Timestamp date2Timestamp(Date value) 

Method Source Code


//package com.java2s;
/*/* w  ww  .j  a  v  a2  s .  c  o  m*/
 * Copyright (C) 2010 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.sql.Timestamp;

import java.util.Date;

public class Main {
    /**
     *
     * @param value Date
     * @return Timestamp
     */
    public static Timestamp date2Timestamp(Date value) {
        if (value != null) {
            return new Timestamp(value.getTime());
        }
        return null;
    }
}

Related

  1. concatDateAndTime(Timestamp date, Time time)
  2. convertTS2HHMM(Timestamp timeStamp)
  3. copyOrCreateTimestampNullsafe(Date date)
  4. createDateTimestamp(java.util.Date date)
  5. date2Timestamp(Date date)
  6. dateAdd(Timestamp t1, Integer i, int type)
  7. dateAndTimeToTimestamp(Date data, Time hora)
  8. dateIntToTimestamp(int dateInt)
  9. datesDiffer(Timestamp a, Timestamp b)