|
I want to get the year (or month or day) portion from a TSQL (T-SQL) statement. How to do that? |
|
There are various ways to do that:
select substring(convert(varchar(20),getdate(),112),1,4) --year |