March 30, 2011 at 1:03 pm
How to get the filename with this expression ?
(DT_STR,4,1252)(DATEPART("yyyy",GETDATE())) +(LEN((DT_STR,2,1252)(DATEPART("MM",GETDATE()))) == 2 ? (DT_STR,2,1252)(DATEPART("MM",GETDATE())) : "0" + (DT_STR,2,1252)(DATEPART("MM",GETDATE()))) + (LEN((DT_STR,2,1252)(DATEPART("dd",GETDATE()))) == 2 ? (DT_STR,2,1252)(DATEPART("dd",GETDATE())) : "0" + (DT_STR,2,1252)(DATEPART("dd",GETDATE()))) +"_"+ REPLACE((SUBSTRING((dt_wstr,30) GETDATE() ,12,8)),":","") + "_"+ @[User::ATMTW_File_Name]
This only returns 20110330_012059 without the filename.
Thanks,
PB
March 31, 2011 at 12:40 am
Where do you see the value 20110330_012059? During runtime or designtime? Is the variable that contains the filename populated?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 31, 2011 at 7:59 am
This expression is in the File system task to move the file from one directory to another with yyyymmddhhmmss_Filename format . But I am only getting this yyyymmddhhmmss_ .
April 1, 2011 at 1:50 am
PSB (3/31/2011)
But I am only getting this yyyymmddhhmmss_ .
I repeat my question: when do you see this value? During runtime or during designtime?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 1, 2011 at 3:55 am
Hi,
I'm able to generate the file name using the given expression.Make sure that the varaible @[User::ATMTW_File_Name] is having some default value in it (Check in the variables windows).
Thanks
sam
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply