Tuesday, September 24, 2013

SQL Trick KB: Algorithm - Convert seconds in into Hours:Minutes

This post was formerly published at my beloved old blog "On the quest of a DBA's adventure......"

Here is just a knowledge capture so I that I don't need to think about it from scratch again.

A BI developer buddy comes to me for help with converting a data field, which is in seconds, into something more user-friendly, Hours:Minutes. Thought it would be supper easy task but when I claw further toward the goal, I find it is a bit of work than just maths.

Here is the code:

No comments:

Post a Comment