how to get nowyear from date in sql code example Example: get current year sql select year(getdate())