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 2000 Forums
 SQL Server Administration (2000)
 datetime format change in database

Author  Topic 

vivekchandra9
Starting Member

5 Posts

Posted - 2005-06-07 : 14:00:22
I have a column in my database with datetime data type. e.g.
TransDate
10/19/2004 9:04:00 AM
10/19/2004 9:05:00 AM
10/19/2004 9:17:00 AM

I want to change that column to date collumn e.g.
TransDate
10/19/2004
10/19/2004

The table which I have has more than 800 million records. What would the best possible way to do that ? and also in future if I want to change the date format to yyyy/mm/dd how can I do that?

Thanks.

KLang23
Posting Yak Master

115 Posts

Posted - 2005-06-07 : 14:22:53
Hi,

Currently, there is no "Date" datatype (SQL 2K).
Keep the datatype as-is (don't change it to a character type), and format it as needed when retrieved.
"DateTime" is stored only one way. The various presentations are based on different setting related to date displays, and/or parameters passed to "Convert" or "Cast" functions.

Cheers.
Go to Top of Page
   

- Advertisement -