Answers for "local date for today java"

0

java Date get today date

SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date today = new Date();
System.out.println(formatter.format(today));
Posted by: Guest on June-02-2021
-1

local date to date java

public LocalDate convertToLocalDateViaInstant(Date dateToConvert) {
    return dateToConvert.toInstant()
      .atZone(ZoneId.systemDefault())
      .toLocalDate();
}
Posted by: Guest on December-04-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language