Friday, March 9, 2012

How to Add Date field and time field (not datetime field )

Good morning...

I begin with SQL, I would like to add a field that will be date like 21/01/2000.

Actually i find just "datetime" format but give me the format 21/01/2000 01:01:20.

How to do for having date and time in two different field.

Sorry for my english....

Cordially

A newbie

There is no dedicated time and date field in SQL Server, you either have to use Datetime or any predefined datatype like VARCHAR which store the data in your own format. You could additionally store the data (depending on your SQL Server version) in a UDT which can be defined as your requirements are.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||sorry to tell you it does not seem that sql server provides such data types. but you may define the custom data types with user-defined data type component.

No comments:

Post a Comment