I am trying to rename the file appending previous Monday date to the filename.I am using the following expression for appending today's date
@[Dest_Dir] + "\\" + @[Dest_File] + "_" + (DT_WSTR,4)DatePart("yyyy", GetDate()) + RIGHT("0" + (DT_WSTR,2)DatePart("mm", GetDate()), 2) + RIGHT("0" + (DT_WSTR,2)DatePart("dd", GetDate()), 2) + ".xlsx"
Which is working fine but When i am replacing getdate() with getdate()-7 to get last Monday date(I run this every Monday) i am getting an error. can someone help me with the expression for previous Monday.