Link to home
Start Free TrialLog in
Avatar of TomCoon
TomCoonFlag for United States of America

asked on

Date Display in SQL Server 2008

Although my regional setting on my SQL Server are set to a customized date format of mm/dd/yyyy when I open a table it displays date yyyy-mm-dd and when my application retrieves information from the table that is the format it comes across in (yyyy-mm-dd).  How can it get it back to displaying as mm/dd/yyyy so I don't have for format every call to a saved date field.
Avatar of ProjectChampion
ProjectChampion
Flag of United Kingdom of Great Britain and Northern Ireland image

Use Covert-101 in your queries to ensure you always get the dates in mm/dd/yyyy format, e.g.
SELECT CONVERT(VarChar(50), GETDATE(), 101)
produces: 06/10/2010
Avatar of TomCoon

ASKER

The queries are in the application, so I can't get to them to do a convert or cast.
ASKER CERTIFIED SOLUTION
Avatar of ProjectChampion
ProjectChampion
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TomCoon

ASKER

From http://msdn.microsoft.com/en-us/library/ms174173.aspx 
"SQL Server Management Studio presents dates formatted with the Microsoft Windows Regional and Language Options in effect when SQL Server Management Studio was started. Restart SQL Server Management Studio to reflect newer settings."

But SSMS is not using the regional settings to display the dates, it's using the yyyy-mm-dd format.
>>But SSMS is not using the regional settings to display the dates, it's using the yyyy-mm-dd format.<<
As I stated: "SSMS for one does not use your regional settings for this purpose."
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TomCoon

ASKER

I've requested that this question be deleted for the following reason:

No anwser was provided
The author did not like the answer I gave them.
Avatar of modus_operandi
modus_operandi

TomCoon,
 
I am starting the self-close process on this question because it appears to me that the Expert(s) answered your question, even if it was not necessarily the answer you wanted to see.
 
modus_operandi
EE Admin