We are going to achieve this using the Inbuilt
functions in SQL i.e Convert, DateAdd and DatePart.
First of all I create a table with 2 columns, one is to store time and another
for date but instead of datetime format, I am saving it in varchar columns.
Table script:
create
table testdate(
TimeField varchar(50),
DateField varchar(50)
)
Then am inserting the following records into the table.
insert
into testdate values('00:34:30
AM','5/6/2012')
insert
into testdate values('01:45:40
AM','5/6/2012')
insert
into testdate values('07:01:00
AM','5/6/2012')
insert
into testdate values('4:01:00
PM','5/6/2012')
Now we need to sum the TimeField column in the above table. We are going to do
it in single query but there are 4 steps inside that.

Prashant BhallaPosted Jan 14, 2020, 6:25 PM
What if adding two time columns having value more than 24:00 hrs ?
SubashPosted Aug 30, 2016, 10:19 PM
Nice