How to get current date time (today's date) in Java
How to get current date time (today’s date) in Java
In this article, we will discuss how to get current date and time using the legacy Date and Calendar apis alongwith the Java 8 LocalDate, LocalTime, LocalDateTime and ZonedDateTime apis. Current date using java.util.Date instance Date d1 = new Date(); System.out.println(d1); // Tue Mar 06 22:50:37 EST 2018 If you are looking to format the current date in a specific format, use the…
View On WordPress













