External Article

Working with Time Spans and Durations in SQL Server

What is the best way to return the "duration" of an event in SQL, given the start and end datetime values? How can we add up these durations to return grand totals? What data types should be used to return this data to our clients? How do we handle overflows, such as when hours go over 23 or minutes total up to over 59? Are there any T-SQL functions or other techniques that are useful in these scenarios?

Blogs

A New Word: los vidados

By

los vidados – n. the half-remembered acquaintances you knew years ago, who you might...

In-Person CISA Training – April 13-16, 2026

By

I will be leading an in-person Certified Information Systems Auditor (CISA) exam prep class...

EightKB 2026

By

EightKB is back again for 2026! The biggest online SQL Server internals conference is...

Read the latest Blogs

Forums

query to track time spent on individual tasks in SSIS

By water490

Hi everyone I am looking at building a query to determine how much time...

SQL Server Transactional Replication from Always On Availability Groups to Azure SQL Database

By Terry Jago

Comments posted to this topic are about the item SQL Server Transactional Replication from...

Hidden Heroes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Hidden Heroes

Visit the forum

Question of the Day

Identities and Sequences I

When thinking of the Identity property for auto incrementing columns and sequences for the same action, which are explicitly linked to increment a number in a table when a new row is added?

See possible answers