How can I create a query or SP to correct SQL Date format issue
Hi I have some dates stored as Varchar within an SQL database, because of code issues in the application it is not possible to change the SQL fields to DateTime, I can report on the data by date if I Convert the string to 103 UK format, but I have many users who are US based is there anyway to check the local/format of the fields then have sql return the correct data by either a view or SP as I do not really want to have seperate reports due to Date issues?
US systems report the error attached.
CONVERT(datetime, AD_ContractEndDate, 103) < DATEADD(MONTH, 3, GETDATE()) Capture.JPG
Microsoft SQL Server 2008Microsoft SQL Server 2005