new localdate code example Example: date to localdate dateToConvert.toInstant() .atZone(ZoneId.systemDefault()) .toLocalDate();