About
A Date is a java object that wraps time information.
- javase/9/docs/api/java/util/Date.html - The class Date represents a specific instant in time, with millisecond precision. It's an instant on the time-line, not a “date”. (ie not the description of the date, as used for birthdays.) The actual data stored is a long count of milliseconds since 1970-01-01T00:00Z (midnight at the start of 1970 GMT/UTC).
- javase/9/docs/api/java/sql/Date.html wrapper around javase/9/docs/api/java/util/Date.html that stores the date with milliseconds in epoch format in the timezone zero GMT (ie london)
- Java - LocalDate (no timezone, no time part with day precision, only YYYY-MM-DD)
Articles Related
Management
Conversion
to Calendar
Date actualDate = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(actualDate);