Back in 2015, we published an article discussing top five libraries we used at the time. However, the Android platform has grown rapidly since then. As you know, in the fast-paced field of software development, things change and evolve at lightning speed. That’s why we’ve decided it’s time for an. Date and Calendar class and we will also cover how this can be achieved using the Java 8 java.time classes like Instant, ZoneId, LocalDate.
![]()
In this article we will cover how to initialize a date time object with time set as the start of the day or midnight or at 00:00:00 AM in Java. We will do so using the legacy
java.util.Date and Calendar class and we will also cover how this can be achieved using the Java 8 java.time classes like Instant , ZoneId , LocalDate etc.
When we say set time to start of day or midnight, we mean, if the date today is 3rd September 2019, and the time is any time of the say, when I run my code, I should get the date and time as 3rd Sptember 2019 00:00:00 AM i.e. the time of the start of the current day.
Using
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |