Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java getTime

String formatCode = "yyyy-MM-dd 'at' HH:mm:ss z"; // Example
SimpleDateFormat formatter = new SimpleDateFormat(formatCode); // Time Formatter
Date date = new Date(System.currentTimeMillis);

String time = formatter.format(date);
// e.g. time = 2021-04-15 at 11:11:11 UTC
 
PREVIOUS NEXT
Tagged: #java #getTime
ADD COMMENT
Topic
Name
8+4 =