UDF to convert Seconds to DDD:MM:MM:SS Format

This function takes a number of Seconds in BIGINT format and calculations and displays that in a DDD:HH:MM:SS format.I wrote this because I needed to work out the duration between two datetimes and required the result to be displayed in a Report (VARCHAR (12)) format from a Select statementTo Use:SELECT dbo.csp_SecondsToDaysHoursMinutesSeconds(DATEDIFF(SS, , ))  AS DurationFROM […]

2002-05-09

275 reads

Blogs

The T-SQL Tuesday Corollary

By

T-SQL Tuesday is a fantastic series of blog posts derived from over 130 topics...

How to Import Perfmon Data into a SQL Server for Analysis

By

If you followed the last video, I showed you how to set up windows...

How To Set Up Perfmon for 24×7 Collection

By

I just released a new training video (one of many to be released in...

Read the latest Blogs

Forums

OLAPQueryLog does not work for SSAS Tabular mode

By Tho Le

I running into a problem when I try to setup querylog in SSAS. The...

Code to auto-update tables on set date

By thetubageek

I am in a project where information is being pulled from a database then...

Required Environment Variables

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Required Environment Variables

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers