I am trying to subtract 1 month from the current YearMOnth...It's datatype is a varchar(6)
I am using this but not getting the correct result
asked Mar 01, 2012 at 04:10 PM in Default
You can't use datetime functions on varchar like that - it has no idea that the string is supposed to represent 'yyyymm'
This converts your string +'01', which is the style 112, to a date, and then does the dateadd manipulation.