[dba-SQLServer] What datatype to use for a Time field

pcs at azizaz.com pcs at azizaz.com
Mon Oct 8 07:37:18 CDT 2007


Hi,

What datatype to use when creating a field / column to 
handle handle time - say in 24 hour format - 
If I use DateTime datatype - when entering 10:00; 14:00 or 
2:00 PM the system enters current date and the time - I just 
want the time part!

In Access you could easily format the field to display the 
time element only.
And if removing the Format element on the field - it still 
only displays the time element.

What's 'best practice' is SQL?  (using SQL2005)

Another question:
How to widen the last column in a view in SSMS ??

Regards 
Borge



More information about the dba-SQLServer mailing list