I want to create a date string for 2 quarters ago, e.g., if we are currently in 2018:1 I want to generate the string "2017:3". I tried the command
Code: Select all
%qlag2= @datestr(@dateadd(@now ,-2,"Q"),"yyyy:q")
However, it does not work, see
How can I do this in another way?
Thomas