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

335 reads

Blogs

Why Optimize CPU for RDS SQL Server is a game changer

By

One feature that I have been waiting for years! The new announcement around optimize...

Performance tuning KubeVirt for SQL Server

By

Following on from my last post about Getting Started With KubeVirt & SQL Server,...

T-SQL Tuesday #193 – A Note to Your Past, and a Warning from Your Future

By

I haven’t posted in a while (well, not here at least since I’ve been...

Read the latest Blogs

Forums

Change Tracking – Troubleshooting

By Phil Parkin

I have change tracking configured in several databases, in QA and production environments, and...

is there a no code way to limit an ssis extract from excel to the 1st 21 rows?

By stan

is there a no code way to limit an ssis extract from excel to...

Pivot but preserve all rows on Aggregate column

By getsaby

Hello Need help in pivoting this data set, the Pivot takes MIN/MAX on a...

Visit the forum

Question of the Day

What is the PRODUCT

In SQL Server 2025, what does this return?

CREATE TABLE Numbers
( n INT)
GO
INSERT dbo.Numbers
(
n
)
VALUES
(1), (2), (3)
GO
SELECT PRODUCT(n)
FROM dbo.Numbers

See possible answers