Technical Article

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 […]

You rated this post out of 5. Change rating

2002-05-09

330 reads

Blogs

Getting Started with the MSSQL AI Agent in VS Code

By

Recently I was working in VS Code and I saw a walkthrough for the...

Summer Speaking Summary 2025

By

In the blink of an eye, summer has passed. I don’t know about you,...

From Chaos to Clarity: How Microsoft Purview Streamlines Data Governance

By

In today’s digital landscape, data is both a strategic asset and a potential liability....

Read the latest Blogs

Forums

Change Tracking Data Retention Options

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Change Tracking Data Retention Options

Requiring Technical Debt Payments

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Requiring Technical Debt Payments

Using the FP-Growth Algorithm to Mine Useful Patterns in Data

By Daniel Calbimonte

Comments posted to this topic are about the item Using the FP-Growth Algorithm to...

Visit the forum

Question of the Day

Change Tracking Data Retention Options

If I am running this code:

ALTER DATABASE AdventureWorks2017 SET CHANGE_TRACKING = ON (CHANGE_RETENTION=4 xxx);
What are the possible choices for xxx?

See possible answers