Hi,
I'm running SQL Server 2008 and am writing a view, but I'm not getting the intended results. In my DB table, I have a datetime field that has the format of yyyy-mm-dd hh:mm:ss I need to convert the field to mm-dd-yyyy. In my view I'm using the Convert function. Here's what I'm using:
CONVERT (VARCHAR(10), dbo.workorders.DateReceived, 101)
My results look ok, until I try to sort the data. If I sort in Descending order, the first record show 12/31/2013. I have to scroll down the results to view anything in the current year. Why is my data not sorting correctly? Thanks!