TSQL, How can I get only the year part?
Posted on 2011-03-18
I have a column type as nvarchar(4) null which I converted to DateTime. It originally has the 4 digits of year. After changing to DateTime type, the data now has a 1/1 as the month and date and 12;00 am as the time. How can I change it to only the year part? thanks.
This is what I used to change the column type
ALTER TABLE BkPersonDegree ALTER COLUMN degree_Date DateTime