MYSQL Timestampdiff output formatting last two decimals -


simple question

what best way change output displays last 2 decimals?

select avg(timestampdiff(hour, start_it,start_qa) 

so output of '13.2500' displays '13.25'.

thanks help.

normally, in application layer. if insist on doing in database, can use format():

select format(avg(timestampdiff(hour, start_it,start_qa), 2) 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -