Create a Timestamp Object Using System.currentTimeMillis() in Java

Description

The following code shows how to create a Timestamp Object Using System.currentTimeMillis().

Example


  /*from w w w. ja  v a 2 s  . c om*/

public class Main {

  public static void main(String[] args) {

    new java.sql.Timestamp(System.currentTimeMillis());
  }

}




















Home »
  Java Tutorial »
    JDBC »




Batch
Binary Data
Database
Date Time
Insert
ResultSet
SQL
Statement
Stored Function
Table