Question
How can I convert this to numeric
Here is part of sql code that we are using to gather totals
for a month/year (month_status) :
SELECT COUNT (activity_ID) AS totalCount,
RTRIM(CONVERT(CHAR(2),DATEPART(month,a.activity_date), 110))+'/'+ CONVERT(CHAR(4), RIGHT(DATEPART(year,a.activity_date), 2), 110) AS Month_Status,
DATEPART(MONTH, a.activity_date) AS MONTH, DATEPART(YEAR, a.activity_Date) AS YEAR
The month_status is mm/yy and is used as the x axis label for the chart.
The order by statement shows 10/08, 11/08, 12/08, 4/08, 5/08, 6/08. 7/09, 8/08, 9/08
How can this be converted to numeric so that the output display in numeric order :
4/08, 5/08, 6/08, 7/08, 8/08, 9/08, 10/08, 11/08, 12/08 ??
SELECT COUNT (activity_ID) AS totalCount,
RTRIM(CONVERT(CHAR(2),DATEPART(month,a.activity_date), 110))+'/'+ CONVERT(CHAR(4), RIGHT(DATEPART(year,a.activity_date), 2), 110) AS Month_Status,
DATEPART(MONTH, a.activity_date) AS MONTH, DATEPART(YEAR, a.activity_Date) AS YEAR
The month_status is mm/yy and is used as the x axis label for the chart.
The order by statement shows 10/08, 11/08, 12/08, 4/08, 5/08, 6/08. 7/09, 8/08, 9/08
How can this be converted to numeric so that the output display in numeric order :
4/08, 5/08, 6/08, 7/08, 8/08, 9/08, 10/08, 11/08, 12/08 ??
