I have a table with two DATETIME columns:
Column1 Column2
1/1/1900 12:20:45 1/1/1900 23:22:25
1/1/1900 09:00:00 1/1/1900 18:10:30
… …
(Times are in the format HH:MM:SS.)
I want to take a total of column 1 and total of column 2. If the table had only the two rows shown above, the expected outcome would be:
Column1 Column2
1/1/1900 21:20:45 1/1/1900 41:32:55
Note that hours, minutes, and seconds should not exceeded 60.
How do I sum these columns in SQL Server 2000?
this will give you what you are after:
OUTPUT:
However, this will accurately sum the times, incrementing the day, month, and year as well:
OUTPUT: