Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 tcmccann1

Author  Topic 

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-11-07 : 05:24:06
what the best way to record a time in sql with no date just time

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-07 : 05:25:58
Use SMALLDATETIME datatype. That is accurate to the minute.
DATETIME is accurate to a 1/333 of a second.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pmccann1
Posting Yak Master

107 Posts

Posted - 2006-11-07 : 05:30:02
does this have to include the date though or can it be left blank
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-07 : 05:32:43
The date will be set to 19000101 (Jan 1, 1900). But that is not a concern.
Worry about format of time in the client application.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-09 : 10:35:46
>>Worry about format of time in the client application.



pmccann1, when you post question, make sure the subject is understandable

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -