I\'ve got a DATETIME column in a SQL Server 2008 table called ShiftDate. I want to convert this to a DATE column in a query:
SELECT ID, ScheduleID, Shift
Sometimes this works...
CAST(CAST(YourDate AS char(10)) AS Datetime)
(Yes I know it is not Date, but it is one step closer)
In the same query, it worked in the outside select, but not inside the union all...
Don't ask why :P