Jump to content

Fazer um select que converta segundos em Horas, Minutos, Segundos

Go to solution Solved by Rechousa,

Recommended Posts

  • Solution


Crias uma função que faça isso por ti e depois usas o resultado dessa função na tua query.

60 segundos = 1 minuto.

60 minutos = 1 hora.


-- Assumindo que a tua função chamar-se-á ConverteTempoParaHMS
SELECT tempo, dbo.ConverteTempoParaHMS(tempo) FROM tabela

Espero ter ajudado.

Edited by Rechousa

Pedro Martins

Sharing is Knowledge!


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.