I have a variable containing it an expression that corresponds to a directory of folders.
I want to show the year and the previous month:
"c: \" + SUBSTRING ((dt_str, 50, 1252) GETDATE (), 1, 4) + "\" + RIGHT ("0" + (DT_STR, 2, 1252) MONTH ", -1, GETDATE ())), 2)
Sai: c: \ 2017 \ 09
, but let's imagine that we are in the month January and the previous month is (12) and the year is also the previous one. As it is, every year I would be forced to intervene.
Is there no way around this and put a relationship between the month and the year so that it is always automatically?