Loi,
If you want to store the data as type datetime, it will not "look like"
anything in the table. However, you can make it look however you
want when you select the results. Date values are stored as bits, not
as formatted character strings. The yyyy.dd.mm format is not one of
the numbered formats to use with convert(), so you will need to select
your datetime value and use string functions to format it. Try this:
select convert(char(4),[date],112) + convert(char(5),[date],4) from
yourTable
Steve Kass
Drew University
Loi Tan Vo wrote:
Hi,
I have a text file that contains a date column. The text file will be
imported to database in SQL 2000 server. After to be imported, I want
to convert the date column to date type.
For ex. the text file look like
Name date
Smith 20003112
Jennifer 19991506
It would be converted date column to ydm database in SQL 2000 server.
In the table it should look like this
Name Date
Smith 2000.31.12
Jennifer 1999.15.06
Thanks in advance
- Loi -