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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Time Value Storage

Author  Topic 

sqllearner
Aged Yak Warrior

639 Posts

Posted - 2007-02-20 : 13:16:19
What is the best way to store the time (without the date)in the sql server database.

X002548
Not Just a Number

15586 Posts

Posted - 2007-02-20 : 13:56:11
datetime values always store both..want to supply some more explanation of what you are trying to do?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-20 : 15:19:39
declare @dt datetime

select @dt = '20070221 15:33:51'

select @dt, @dt - cast(@dt - 0.50000004 as int)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -