I wrote a SQL function to convert a datetime value in SQL to a friendlier \"n Hours Ago\" or \"n Days Ago\" etc type of message. And I was wondering if there was a better wa
Your code looks functional. As for a better way, that is going to get subjective. You might want to check out this page as it deals with time spans in SQL.