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

SSIS Expression Help to Get previous month

$
0
0
"F:\\Opr\\Qt5\\MonthlyDeliveryFile\\Qt_Monthly" + (DT_STR,2.1252)Month(getdate())+ (DT_STR,4.1252) Year(Getdate()) + ".txt"

Hi al,

I have a task where I need to generate a file delivery process which is monthly one file for current month and previous month`s .The above expression gets me the desired output of Qt_Monthly42016 which works for me however I have another task in which i need to create previous month`s file and I want to know how can i assign in the file name previous month,

Desire output is QT_Monthly_03_2016, I tried using : see below but i get an error message. Can someone point me in the right direction???

(DT_STR,2.1252)Month(getdate()-1)                                                                                  

FM


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>