CAST(GETDATE() AS DATE)
returns in NVARCHAR(10)
. DATETIME
changes the column to a date, but I don't want the time in it. I want a DATE formatted column that just contains the date. What am I missing?
CAST AS DATE Returns in NVARCHAR Format
652 views Asked by GRANT CURTIS At
3
There are 3 answers
0
On
So apparently it is storing the value with date, it just shows the wrong type on the returned results. If you can see the image, It shows it as Date in two other places, but in the bottom section you can see where it shows as NVARCHAR. I'm not sure why it does that, probably something to do with SQL DBX. Either way, sorry for wasting everyone's time. I've just never seen it display the wrong type in the returned results.
As a way to demonstrate that cast(getdate() as date) does return the data type of date