-1
I’m getting data from a spreadsheet in excel.
public void Hora()
Cell horaAgen = null;
if(row.getCell(7) != null ){
horaAgen = row.getCell(7);
System.out.println("hora: "+horaAgen);
}
}
On the spreadsheet this: 9:00:00 After being read get: 31-dec-1899
What functions should I use to get the right time.
Observing:
- date can get dd/mm/yyyy correctly
- I’m using apache poi
- What data format is being used in the table: Time
- Must convert the obtained time to string
The question lacks information. What type of variable is being used? What data format is being used in the table? This article might help: http://blog.alura.com.br/como-converter-string-para-date-java/
– Rodrigo Rossi
What type of variable is being used: Cell
– alexjosesilva
What data format is being used in the table: time
– alexjosesilva