SSIS Expression to get current date with out timestamp

  • I have folder path c:\Employee\Students20220507023108

    i am using this folder c:\Employee\ in for each loop container and i am planning to bring the foldername dynamically

    like created 2 variables

    folder path- c:\Employee\

    folderName - Students

    Another new variable that holds entire path along with date.

    but the problem is my folder keeps on referring to exact full folder name. Students20220507023108 ( Not always the datetime stamp will be same. every day this folder keeps on changing with datetimestamp. Students Name will be same but datetimestamp will change

    i want to get same datetime stamp what ever the folder is created inside c:\Employee\ and i want to pass this to my foreachloop dynamically.

     

     

     

  • You've stated a requirement without asking a question.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • how to pass folder name to for each loop container dynamically?

    step 1 - using for each loop container with enumerator for each file enumerator

    step 2- i used directory as folderpath c:\Employee\Students20220507023108 and filespec as filetype variable that is *.zip

    Currently i am using folderpath as hardcoded path. how can we make this dynamically ? Always Students remains constant date and time will change everyday.

     

  • Why not configure the Foreach container like this?

    FEL

    The 'Traverse subfolders' option means that all folders underneath Employee will be looped. I'm assuming that you archive folders/files elsewhere once they have been processed, so that there is no risk of a file being processed more than once.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply