SyntaxFix
Write A Post
Hire A Developer
Questions
2011-01-15 = 2011-16 = 1995. This is then being implicitly converted from an integer to a date, giving you the 1995th day, starting from 1st Jan 1900.
2011-01-15
2011-16
1995
You need to use SET @test = '2011-02-15'
SET @test = '2011-02-15'