perez Posted June 14, 2012 at 11:18 AM Report Share #462695 Posted June 14, 2012 at 11:18 AM Boas, eu preciso de calcular a diferença entre 'hora a' e 'hora b'. se 'a' for maior que 'b' não há qualquer problema, mas se 'b' for maior que 'a' como posso fazer? exp: calcular a diferença entre 23h e 5h. sei que são 6h de diferença, mas como posso calcular isso matemáticamente? Link to comment Share on other sites More sharing options...
KTachyon Posted June 14, 2012 at 11:42 AM Report Share #462714 Posted June 14, 2012 at 11:42 AM Se for negativo somas 24 e ficas com a diferença. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
perez Posted June 14, 2012 at 11:48 AM Author Report Share #462720 Posted June 14, 2012 at 11:48 AM Se for negativo somas 24 e ficas com a diferença. obrigado pela resposta. exactamente o que precisava Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now