Good day for the next query, I have a Long variable to which I assign the subtraction of two Datetime, The variable difference stores me the result in Milliseconds but I need them in hours to save them in my column of type Float and not save me this -8.5322904E7 how to modify this method in advance grateful.
public void botonTerminarTiempo() {
tiempos.setFechaHoraFinal(fechaActual);
tiemposFacade.edit(tiempos);
Long diferencia = (tiempos.getFechaHoraInicio().getTime() - tiempos.getFechaHoraFinal().getTime());
tiempos.setTotalHoraHombre(diferencia.floatValue());
tiemposFacade.edit(tiempos);
fechaActual = new Date();
laborSeleccionada = new Labor();
lineaSeleccionada = new Linea();
operarioSeleccionado = new Operarios();
ordentrabajo = new Ordentrabajo();
tiempos = new Tiempos();
}