Java Timestamp Field getNowTimeStamp()

Here you can find the source of getNowTimeStamp()

Description

get Now Time Stamp

License

Open Source License

Return

Timestamp

Declaration

public static Timestamp getNowTimeStamp() 

Method Source Code


//package com.java2s;
import java.sql.Timestamp;

import java.util.Date;

public class Main {

    public static Timestamp getNowTimeStamp() {
        // return System.currentTimeMillis();
        return new Timestamp(getNow().getTime());

    }//from  ww  w. ja v  a  2s  .  c o  m

    public static Date getNow() {
        return new Date(System.currentTimeMillis());

    }
}

Related

  1. getNbHours(Timestamp dateA, Timestamp dateB)
  2. getNextDayStart(java.sql.Timestamp stamp)
  3. getNextTimestamp(Timestamp previous, long nrDays)
  4. getNotNullTimestampValue(String timestamp, String format)
  5. getNowTimeStamp()
  6. getNowTimestamp()
  7. getOffsetDaysTime(Timestamp sysDate, int offsetDays)
  8. getPerformanceTime(Timestamp startTime)
  9. getPeriodExpiration(Timestamp tsStartDate, int iPeriodType, int iPeriodDuration)