Hi,
Can anyone please help. I am working on a reporting project using Birt
The issue I'm having now is on the sql server side in my query I have this query set
DECLARE @JDate DATE SELECT FORMAT(JDate,'MMM-yyyy') AS JMonth FROM dbo.Table1 WHERE CAST(JtDate AS DATE) BETWEEN '2017-01-01' AND '2018-03-31' GROUP BY YEAR(JDate) * 100 + MONTH(JDate),FORMAT(JDate,'MMM-yyyy') Order BY YEAR(JDate) * 100 + MONTH(JDate)
Which works great. Gives me the output i want as
Apr 2017
May 2017
Jun 2017
Jul 2017
In Birt this is pulled in Computed Columns as a string I need to turn this string to a date type. Either using javascript expression to format as i want above or change my query in sql server. Not sure best way to achieve this.
If i ran this query in SQL Server
DECLARE @JDate DATE SELECT CAST(JDate AS DATE) AS JMonth FROM dbo.Table1 WHERE CAST(JtDate AS DATE) BETWEEN '2017-01-01' AND '2018-03-31' GROUP BY YEAR(JDate) * 100 + MONTH(JDate),CAST(JDate AS DATE) Order BY YEAR(JDate) * 100 + MONTH(JDate)I get the following output some
I need the format to be
Apr 2017
May 2017
Jun 2017
Jul 2017
In both columns.
Thanks in advance