I have one SSIS which takes data from .csv file and insert into sql table
now my file name is
Flat file properties and expression for connection string is :
@[User::Directory] + @[User::Filename]+" "+(DT_STR,4,1252)DATEPART( "yyyy" , getdate() ) +"-"+
RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , getdate() ), 2) +"-"+
RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , DATEADD("day", -1, GETDATE()) ), 2) +".csv"
which gives me filename like : C:\mytempdata\ACCTMVCHNG_CSV 2011-09-18.csv
this is yesterdays filename
but when i run this package on monday the file present is for friday only name will be ACCTMVCHNG_CSV 2011-09-16.csv
so i want to use if else into this expression
like if todays day is monday then take fridays file i mean create file path for friday
like this : C:\mytempdata\ACCTMVCHNG_CSV 2011-09-16.csv
or else take as it is yesterdays like what i'm doing in above expression...