Code example for Timestamp

Methods: getNanos, getTime

0
        return new Timestamp(start.getTime()
                + ((int) (24L * 60L * 60L * 1000L * days)));
    } 
 
    public static double getInterval(Timestamp from, Timestamp thru) {
        return thru != null ? thru.getTime() - from.getTime()
                + (thru.getNanos() - from.getNanos()) / 1000000 : 0;
    } 
 
    /** 
     * Return a Timestamp for right now 
     * 
     * @return Timestamp for right now 
     */ 
    public static java.sql.Timestamp nowTimestamp() {
        return getTimestamp(System.currentTimeMillis());
    } 
 
    /** 
     * Convert a millisecond value to a Timestamp. 
     *