I have a question. I need to convert and display the data from database which it's a timestamp to date format only. *the format is dd/MM/yyyy
Currently I writng the code like this but the error says "Cannot format given Object as a Date"
xi.setItem("Dte",db.getDataAt(i,
new SimpleDateFormat("dd/MM/yyyy").format("date_column_from_db")));
this is the example of the date column in the database: 20220321211529042 (basically it is a timestamp)
and I want to convert and display the data to date format only, like this: 21/03/2022
Hope to get solution. Thank you!