I'm stuck in a problem, I know that we can use SimpleDateFormat class or other format classes in java to format the date/time. But I'm trying to format the time and date using Formatter class method format. Is that possible? If yes, then how it is possible?
LocalDate date = LocalDate.now();
Formatter formatter = new Formatter();
formatter.format("%tm/%td/%ty", date);
System.out.println(formatter);
I got java.util.MissingFormatArgumentException: Format specifier '%td'.