Click here to Skip to main content
15,860,859 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to Calculate Total Time Difference Pin
David Mujica28-Jul-14 3:28
David Mujica28-Jul-14 3:28 
AnswerRe: How to Calculate Total Time Difference Pin
Andrius Leonavicius28-Jul-14 11:32
professionalAndrius Leonavicius28-Jul-14 11:32 
GeneralRe: How to Calculate Total Time Difference Pin
Mycroft Holmes29-Jul-14 13:05
professionalMycroft Holmes29-Jul-14 13:05 
GeneralRe: How to Calculate Total Time Difference Pin
Andrius Leonavicius29-Jul-14 14:03
professionalAndrius Leonavicius29-Jul-14 14:03 
GeneralRe: How to Calculate Total Time Difference Pin
Mycroft Holmes29-Jul-14 14:25
professionalMycroft Holmes29-Jul-14 14:25 
GeneralRe: How to Calculate Total Time Difference Pin
Andrius Leonavicius29-Jul-14 14:39
professionalAndrius Leonavicius29-Jul-14 14:39 
AnswerRe: How to Calculate Total Time Difference Pin
Mycroft Holmes29-Jul-14 14:29
professionalMycroft Holmes29-Jul-14 14:29 
AnswerRe: How to Calculate Total Time Difference Pin
Swinkaran4-Aug-14 16:28
professionalSwinkaran4-Aug-14 16:28 
SQL
<pre lang="SQL">/****** Script for Select the Time difference in HH : MM ******/
SELECT [Id],
CONCAT (DATEDIFF(HOUR ,StartDate, EndDate),
            N' : ',
            (DATEDIFF(MINUTE,StartDate, EndDate) % 60)) as TimeTaken
  FROM [dbo].[YourTable]

Above example, I am first finding the Hour, then finding the minutes. Finally, do a Concatenation to get the results in the format of HH:MM. Hopes this helps.
QuestionSQL SERVER DBA--- HELP ME WITH THIS.... Pin
Member 1097517927-Jul-14 20:57
Member 1097517927-Jul-14 20:57 
AnswerRe: SQL SERVER DBA--- HELP ME WITH THIS.... Pin
Tim Carmichael28-Jul-14 2:58
Tim Carmichael28-Jul-14 2:58 
AnswerRe: SQL SERVER DBA--- HELP ME WITH THIS.... Pin
Mycroft Holmes29-Jul-14 14:33
professionalMycroft Holmes29-Jul-14 14:33 
QuestionProblem with SSIS 2012 Pin
amioni24-Jul-14 0:41
amioni24-Jul-14 0:41 
SuggestionRe: Problem with SSIS 2012 Pin
Richard Deeming24-Jul-14 1:57
mveRichard Deeming24-Jul-14 1:57 
GeneralRe: Problem with SSIS 2012 Pin
amioni24-Jul-14 2:04
amioni24-Jul-14 2:04 
QuestionRe: Problem with SSIS 2012 Pin
Richard Deeming24-Jul-14 2:13
mveRichard Deeming24-Jul-14 2:13 
AnswerRe: Problem with SSIS 2012 Pin
amioni24-Jul-14 3:00
amioni24-Jul-14 3:00 
GeneralRe: Problem with SSIS 2012 Pin
Richard Deeming24-Jul-14 3:12
mveRichard Deeming24-Jul-14 3:12 
GeneralRe: Problem with SSIS 2012 Pin
amioni24-Jul-14 3:25
amioni24-Jul-14 3:25 
QuestionRe: Problem with SSIS 2012 Pin
GuyThiebaut24-Jul-14 2:44
professionalGuyThiebaut24-Jul-14 2:44 
AnswerRe: Problem with SSIS 2012 Pin
amioni24-Jul-14 2:51
amioni24-Jul-14 2:51 
AnswerRe: Problem with SSIS 2012 Pin
GuyThiebaut24-Jul-14 3:26
professionalGuyThiebaut24-Jul-14 3:26 
GeneralRe: Problem with SSIS 2012 Pin
amioni24-Jul-14 4:09
amioni24-Jul-14 4:09 
GeneralRe: Problem with SSIS 2012 Pin
GuyThiebaut24-Jul-14 4:43
professionalGuyThiebaut24-Jul-14 4:43 
GeneralRe: Problem with SSIS 2012 Pin
jschell24-Jul-14 11:44
jschell24-Jul-14 11:44 
GeneralRe: Problem with SSIS 2012 Pin
amioni24-Jul-14 21:54
amioni24-Jul-14 21:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.