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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSSQL datetime format

Status
Not open for further replies.

akronymn

Programmer
Apr 22, 2009
3
US
I have an mssql database that I need to migrate to mysql. For some reason though any queries to any columns of type datetime are returned in French in the following format:

7/avr/2004 14:00

This also includes all the text of an SQL dump which not surprisingly makes mysql unable to read the dump from the MSSQL db. I've checked that my windows regional setting is set to English. I'm at a loss as to why this is happening or how to fix it. I just need them to be in mdy h:m:s format. One interesting thing I've noticed also is that if I look at the tables via the MSSQL Server Manager the dates are displayed as mdy h:m:s Thanks! -adam
 
So I tried:

Code:
SP_DEFAULTLANGUAGE @loginame = username, @LANGUAGE = english

in MSSQL Server Manager, which said the command was succesful. However I'm still getting the same results. More specifically:

-If I connect via PHP and then query the database I get the French dates.
-When I run the sqlDump program it connects to the database and all the dates in the dump are in the French format.
-If I run SQL Server Manager and do a query with its query editor I get back the dates in the expected 2004-03-10 10:45:00 format.

Thanks for looking into this, I'm stumped and appreciate all the help I can get! -Adam
 
Did you log out and log back in after changing the default language?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Yep, I disconnected all connections and restarted the SQL server too. Same results across the board.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top