In SQL Reporting Services (SSRS), I have a report that displays Month 1, Month 2, Month 3, etc. through Month 18.
I want to sort these months. But, unfortunately, such a sort order begins with Month 1, Month 10, Month 11, Month 12, .... Month 18, Month 2, Month 3, etc.
The specific month is generated based on the code at the end of this posting. How can I sort this code for SSRS so that the "normal" order of Months appears?
CAST(DATEDIFF(m,GETDATE(),RCG.dbo.POContractHeader.EndDate) + 1 AS VARCHAR(2))