Luis Cazares - Friday, October 13, 2017 1:53 PM
Yeah, should be Day instead of Month, but that's extremely easy to fix: just use code 3 instead of 1:
CONVERT(CHAR(2), SomeDate, 3)
I'd avoid the other method here just because it's so obscure and uncommon. It's very common to convert a date to char, but extraordinarily uncommon to add 100 to the days of a month(!). It'd have to perform significantly better for me to even consider such a trick. [Sure Celko uses 00 as a day,but even he doesn't add 100 to it :laugh:.]
SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.