I have:
int lineTable = Table.getRowCount();
int columnTable= Table.getColumnCount();
Object[][] arrayTable = new Object[lineTable ][columnTable];
for (int j = 0; j < lineTable ; j++) {
for (int i = 0; i < columnTable; i++) {
arrayTable [j][i] = Table.getValueAt(j, i);
}
}
With this, I have a multidimensional array type Object with all data of the table... Can I convert this array to date(HH:mm)?
PS: The data is already in this format(HH:mm), but I don't know how take this directly in date format...
I did it! Just made these changes:
int lineTable = Table.getRowCount();
int columnTable= Table.getColumnCount();
Date[][] arrayTable = new Date[lineTable ][columnTable];
for (int j = 0; j < lineTable ; j++) {
for (int i = 0; i < columnTable; i++) {
arrayTable [j][i] = (Date)Table.getValueAt(j, i);
}
}
Thanks for all!
Try something like this:
This will parse a date in the given format. You can also create another DateFormat for formatting the date when you print if if you want a different format example:
This is just an example you can use whatever format you want...if you only want to give hours and seconds do that.