Changing Date from Alphanumeric to Numeric | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Changing Date from Alphanumeric to Numeric

Seems odd but sometimes my queries return the datetime in Numeric format such as mm/dd/yy and other times in an alphanumeric format like Feb 10, 2000. I use the SET DATEFORMAT mdy to define the format but how do I change the style? Also, why would it fluctuate?
They return the results different in Query Analyzer or in your applications? MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Look at CAST and CONVERT in BOL for common styles. Actually I think this sounds more of a presentational issue that you should handle at the client.


Could be eklpublic is querying against different servers, using GETDATE(). The result reflects the date format and language settings of the Windows installation of the server. (Who in the world came up with the idea that a region-specific result would be a nice and fitting answer to a basic function like "what day is today"? And that if I ask for a date, that I would have any need for the time of day?)