java gettime

Solutions on MaxInterview for java gettime by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "java gettime"
Joséphine
17 Jul 2019
1String formatCode = "yyyy-MM-dd 'at' HH:mm:ss z"; // Example
2SimpleDateFormat formatter = new SimpleDateFormat(formatCode); // Time Formatter
3Date date = new Date(System.currentTimeMillis);
4
5String time = formatter.format(date);
6// e.g. time = 2021-04-15 at 11:11:11 UTC