0
Good afternoon, I know that the way I’m going to explain it is difficult to help me.
I have a jTable that contains a column where times are shown, those times in mm:ss. I need to average between these times. I’ve made several attempts with different alternatives to achieve the goal but I can’t even think of one form to carry out this calculation.
My difficulty: We have the values inside jtable’s Colum, so these values are strings.
What I tried to:
- I tried to create a converter for mm:ss with Simpledateformat and store the information in a vector, where after that it would try to add the dates.
Upshot: a Bos**, I could not add up the way I imagined I would because as much as I was using Simpledateformat with mm:ss he returned to me Thu Jan 01 00:00:10 BRT 1970.
Only usable part of my code:
for (int i = 0; i < table.getRowCount(); i++) {
tempo_chegada = table.getValueAt(i, 5).toString();
}
I can’t think of a logic of how I’m going to add up when I only have strings from a column of a jtable that can exist 1000 lines
I know it’s vacant because I don’t have a well-founded piece of code, but I have no idea where to start
I’ll test, apparently that’s it
– Vinicius Leonardo
Perfect, thanks!
– Vinicius Leonardo