I got this problem in my code. I want to show a date in dd/mm/yy
, for example 04/11/19
.I don't know how to do it, I tried something like this:
new SimpleDateFormat("dd/mm/yy").format(getDate())
But it does mm/dd/yyyy
. This is my code I tried to format:
for (Information t : list) {
tblInfo.addItem(
new Object[] { t.getName(), t.getLocation(), t.getTypeProduct().getDescription(), new SimpleDateFormat("dd/mm/yy").format(t.getTodayDate) }, null
);
}