Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to get current date stamp in java

import java.text.SimpleDateFormat;
import java.util.Date;

public class SimpleTesting{
    public static void main(String[] args) {
        SimpleDateFormat date = new SimpleDateFormat("yyyy.MM.dd.HH:mm:ss");
        String timeStamp = date.format(new Date());
        System.out.println("Current Time Stamp: "+timeStamp);
    }
}
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #current #date #stamp #java
ADD COMMENT
Topic
Name
9+4 =