Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Rename File With Previous/Prior Month

$
0
0

I currently have dynamcialy created PDF's created through a script task in C# that someone else created. They currently have names like Ford-8-7-2012, Nissan-8-7-2012. The date part is based off of the date it is run.

I need to change the file names to the previous month and current year, which is what the data is for. With the names above the new file names would be Ford-7-2012, Nissan-7-2012. I am not sure if I can use an expression or if I have to dig through the C# code to fix this, as I am not very handy in C#.

I also didn't know if there would be problems when Jaunuary comes considering just reenaming the month aspect would cause it to carry over the previous month with the current year so this coming New Year would be Ford-12-2013 instead of Ford-12-2012.

Any suggestions?


Viewing all articles
Browse latest Browse all 24688

Trending Articles