Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Difference between datetimes on seperate rows

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-10-25 : 08:54:32
Pete writes "Hopefully someone can help me, I am trying to find the time difference between two datetimes in a dataset where the dates are on sequential rows and in different columns.

ie
tblJob_History

job job_start_dt job_end_dt
aaa01 01/01/2004 20:00 01/01/2004 20:30
aaa02 01/01/2004 20:34 01/01/2004 21:45


I am looking to find the difference between job aaa01 endtime and job aaa02 starttime, so the result should be 4 mins.

Any help would be greatfully recieved.

Thanks

Pete"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-10-25 : 09:14:21
i know i already answered this somewhere here before ....

EDIT:
and here it is:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=41620


Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -