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.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • 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.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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