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
 Time?

Author  Topic 

disciple
Starting Member

27 Posts

Posted - 2006-04-02 : 15:49:59
Is there a time datatype or am I forced to just save it as a varchar?

nr
SQLTeam MVY

12543 Posts

Posted - 2006-04-02 : 17:37:43
You can use datetime. It will hold the time and the date will default to 0 = 1 jan 1900. You can display just the time and it will allow datetime arithmetic.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-03 : 01:20:22
Dont use varchar datatype. Use Datetime datatype and use format function in Front end application to show only Time. Also refer this http://vyaskn.tripod.com/searching_date_time_values.htm

Madhivanan

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

- Advertisement -