Home / T-SQL / Calculate time in hours and minutes between two dates

Calculate time in hours and minutes between two dates

 Sounds easy right? I want to calculate the difference in hours and minutes between two dates. A good readable notition for my report. I want a format like this:

00:36:53 OR 02:13:45

This can easy be done using a T-SQL Statement like this:

CONVERT(nvarchar(64), EindDatum-StartDatum, 108) AS Duration

So how does this look like in SQL Server?

T-SQL_Calculate_Difference_In_Minutes_Between_Two_Dates

Check Also

Book Review: Unlocking the Power of DAX: A Deep Dive into Marco Russo’s Definitive Guide

The Definitive Guide to DAX: Business intelligence for Microsoft Power BI, SQL Server Analysis Services, …

Geef een reactie

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *