In SQL Server 2008, I want to get the year of following string format. Parameter will be one of following strings (DateTime.MinValue and DateTime.MaxValue from C#):
'1/1/0001 12:00:00 AM' and '12/31/9999 11:59:59 PM'
Here is my expected answer:
0001 from 1st string.
9999 from 2nd string.