• It seems that my article about Powershell has sparked some T-SQL discussion, so I decided to take the prompt and run some performance analysis on the different solutions presented here.

    You can read the detail over on my blog (http://sqldbamusings.blogspot.com/2012/08/t-sql-performance-of-sql-agent-duration.html), but essentially, the conversions that use math instead of string manipulation seem to be faster and cover a wider range of potential values.

    Before I ran the tests, I really had no clue what the results would be, which is why I wanted to run them. Thanks to all of you the great suggestions - another testament to how great the SQL community is!