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 2008 Forums
 Transact-SQL (2008)
 Data Type for Date

Author  Topic 

best_boy26
Starting Member

42 Posts

Posted - 2011-03-04 : 11:48:31
I have below date format as Input... and I want to insert into table. However before creating a Table what is the best method of data method to be used for the below Format

""
2/4/2011  10:16:01 AM
"" is in one word i.e. date time in milliseconds

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-03-04 : 14:29:53
better to use DateTime datatype .. however if you want to be sticked with the specified format then use varchar datatype, which might be problematic when it comes to searching

Cheers
MIK
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-03-04 : 14:50:56
Use datetime or smalldatetime. Display format should be considered a presentation issue, not a storage issue. Don't use varchar.
Go to Top of Page
   

- Advertisement -