Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to format a datetime object to show date and time and milliseconds in java

public String getCurrentTimeStamp() {
    return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date());
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #format #datetime #object #show #date #time #milliseconds #java
ADD COMMENT
Topic
Name
4+4 =