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

PlanTrace Now Supports PostgreSQL

By

PlanTrace Now Supports PostgreSQL The same plan analysis you know from...

A New Word: the Kinder Surprise

By

the kinder surprise – . the point in your early adolescence when you realize...

Crash-Consistent Snapshot Cloning - Hyper-V Edition

By

If you’ve been following my T-SQL Snapshot Backup series, most of what I’ve covered...

Read the latest Blogs

Forums

The New Wave of Security Threats

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The New Wave of Security...

There's Too Much to Learn

By Steve Jones - SSC Editor

Comments posted to this topic are about the item There's Too Much to Learn

How to Calculate Distance Between Coordinates in SQL Server

By Imran2629

Comments posted to this topic are about the item How to Calculate Distance Between...

Visit the forum

Question of the Day

SSoL Support on the OS

On which Linux versions is SQL Server 2025 on Linux supported?

See possible answers