Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Dates

Status
Not open for further replies.

virtualranger

Technical User
Sep 14, 2001
115
GB
I'm using the import wizard to import data from access tables. Dates in the source tables are in british format (dd/mm/yy), the local machine language is british, and sql server default language is british. However, when I import a the tables the british dates (dd/mm/yy) are converted to american format (mm/dd/yy). Anyone know how I stop it doing this?

Thanks,
Jamie
 
What collation type is the database set to?

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
Are the dates failing the conversion or are they displayed wrong?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
The dates are failing conversion. I didnt change collation type o install so I guess its set to US English, would this is whats causing it? What should I change it to and how easy is it to change the collation settings? dont I have to rebuild the master db or something?

Thanks,
Jamie
 
Yep, that's what is causing the display problem.

To change the default collation type of the server you will need to reinstall I believe. If you aren't going to create to many databases on the box I wouldn't bother.

You can use an ALTER DATABASE statement to change the collation of your database.
Code:
ALTER DATABASE {databasename}
COLLATE {CollationName}
/*
SELECT *
FROM ::fn_helpcollations()
will return a list of collations on the server.
*/

See ALTER DATABASE and COLLATE in BOL.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top