Reputation: 393
How to Insert Only Date and Only time in the table(column datatype is DateTime) using SQL Server 2005.
Upvotes: 1
Views: 2901
Reputation: 48978
As far as I know, Date and Time are always stored together. The intern representation of it is a number, that represents timeticks that are passed since a certain moment.
You can of course filter the date info and the time info out of it and store it as for example a string.
Or you can make a userdefined type as shown here : http://weblogs.sqlteam.com/jeffs/archive/2007/10/31/sql-server-2005-date-time-only-data-types.aspx
Upvotes: 2