SQL SERVER – Puzzle with Year Function | Journey to SQL Authority with Pinal Dave
When we explicitly specify the format string as ‘0001’ or YYYY, the year stored in the variable would be 0001. But when we just use one of two characters for the year, SQL Server implicitly converts the value and uses a date as per “2 digit year cut off” ...