tags:

views:

34

answers:

2

Is there a data type which represents time of day? Such as a datetime data type without the date.

when i format 41 seconds into a datetime data type this is what I get:

1/1/1900 12:00:41 AM

I'm trying to store a duration of time in a table.

A: 

Not in 2005 no, there are plenty of discussions around on this subject.

This being just one of them

Barry
+1  A: 

In SQL Server 2008, there is a Time data type which only stores the time. In versions of SQL Server prior to 2008, your only choice is the DateTime data type (and SmallDateTime) which stores both the date and the time. However, there are means in most languages including T-SQL to show the time portion. What are you trying to accomplish?

Thomas
@Thomas I'm trying to store a duration of time in a table. Then sum several rows together using a group by statement. Perhaps what I could do is store #of ms from midnight
Kevin