Java tutorial
import java.time.LocalDate; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { System.out.println(toString(LocalDate.now())); } public static String toString(LocalDate date) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy"); return date.format(formatter); } }