Java‎ > ‎

Timestamp

Example of creating a timestamp

import java.sql.Timestamp;

public class timestamp {
    public static void main(String[] args) {
        java.util.Date date= new java.util.Date();
        System.out.println((new Timestamp(date.getTime())).toString());
    }
}




Comments