Here you can find the source of getTimestamp(long time)
Parameter | Description |
---|---|
time | millsecond value |
public static java.sql.Timestamp getTimestamp(long time)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { /**/*ww w . j a v a2 s . com*/ * Convert a millisecond value to a Timestamp. * @param time millsecond value * @return Timestamp */ public static java.sql.Timestamp getTimestamp(long time) { return new java.sql.Timestamp(time); } /** * Convert a millisecond value to a Timestamp. * @param milliSecs millsecond value * @return Timestamp */ public static Timestamp getTimestamp(String milliSecs) throws NumberFormatException { return new Timestamp(Long.parseLong(milliSecs)); } }