I need to create a variables called Reporting_Period, which I retrieve from the date variable: Return Closing Date. Reporting_Period needs to look like 2019 - 2020 or 2020 - 2021 etc
I am having problems incorporating that dash and I tried +' - '+
The error message I am getting is:
Operand type clash: date is incompatible with int
What do I need to do?
The code I am trying is as below:
,((YEAR ([Return Closing Date])) +' - '+ (DATEADD(YEAR, -1,([Return Closing Date])))) AS [Reporting_Period]
1条答案
按热度按时间bzzcjhmw1#
Excellent @JohnCappelletti, is worked: