开发者

Microsoft SQL Server 2005 time of day data type

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 开发者_JS百科of time in a table.


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?


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

This being just one of them

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜