0

Brief Architecture

My SSIS package is generating dynamic excel files through Data flow. The file name format is "XYZ_Year_Month_Day_Hour_Minutes.xlsx". So I am using variable with expression which uses getDate() to generate above mentioned format.

Problem

I am writing file, using variable name generated through getDate(). Example: "XYZ_2014年8月1日_03_30". In control flow I want to access same file in File System task to copy it to FTP. But by time the variable changes its value to "XYZ_2014年8月1日_03_32", so unable to locate file.

I tried with System::StartTime, but it stays same throughout package execution and all files get same name.

Is there any way we can store DateTime in a variable & it won't change further?

asked Aug 1, 2014 at 11:45
1
  • 1
    Is there a loop? Otherwise, I don't understand why the StartTime doesn't work. It's value is assigned when the package starts. Your file name is XYZ_YYYY_M_D_HH_MM? Commented Aug 2, 2014 at 13:52

1 Answer 1

1

You could use a script task to set the variable property:

Dts.Variables["uVarDateStamp"].Value = DateTime.Date;
answered Aug 14, 2014 at 16:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.