I am using SSRS 2017 to query a SAP hana database using an ODBC connection.
I return a date column BUDAT
as 20190101
. I am trying to convert this to a date, but in the Sataset screen won't let me use the CONVERT or FORMAT command :
Attempt #1:
CONVERT(DATE, RIGHT(SAPABAP1.AFRU.BUDAT, 2) + SUBSTR(SAPABAP1.AFRU.BUDAT, 3, 2) + LEFT (SAPABAP1.AFRU.BUDAT, 4))
I get an error
Invalid or missing expression
when I "enter" on the code I put in.
Attempt #2
format(SAPABAP1.AFRU.BUDAT, "dd/MM/yyyy")
SQL Server accepts the syntax, but when the query tried to run, I get the error
General error;260 invalid column name;dd/MM/yyy:line1 col 1029 (as pos 1028)
I have spent the last few days off an on trying themes on this code but to no avail
I would like to see the output as dd/MM/yyyy
.