Hi,
I am using SQL Server 2000.
I made this following simple query:
SELECT [TimeOperationBegan],[TimeOperationEnded],
(DATEDIFF(minute,[TimeOperationBegan],[TimeOperationEnded])) AS Diftime
FROM [ORRecord]
The sample results are as follows:
TimeOperationBegan |TimeOperationEnded |Diftime
__________________________________________________________
1899-12-30 10:40:00.000| 1899-12-30 11:22:00.000| 42
1899-12-30 11:41:00.000| 1899-12-30 11:52:00.000| 11
1899-12-30 16:03:00.000| 1899-12-30 16:32:00.000| 29
1899-12-30 23:05:00.000| 1899-12-30 00:32:00.000| -1352
How can i get rid of this negative value and make the query to calculate the difference between 23:05 and 24:32 for the fourth record??
Thanks in advance.
VJ
I am using SQL Server 2000.
I made this following simple query:
SELECT [TimeOperationBegan],[TimeOperationEnded],
(DATEDIFF(minute,[TimeOperationBegan],[TimeOperationEnded])) AS Diftime
FROM [ORRecord]
The sample results are as follows:
TimeOperationBegan |TimeOperationEnded |Diftime
__________________________________________________________
1899-12-30 10:40:00.000| 1899-12-30 11:22:00.000| 42
1899-12-30 11:41:00.000| 1899-12-30 11:52:00.000| 11
1899-12-30 16:03:00.000| 1899-12-30 16:32:00.000| 29
1899-12-30 23:05:00.000| 1899-12-30 00:32:00.000| -1352
How can i get rid of this negative value and make the query to calculate the difference between 23:05 and 24:32 for the fourth record??
Thanks in advance.
VJ