Share via

Date string input to copy data activity appears to change compared to Set Variable

Jonathon Walker 0 Reputation points
2025-02-25T05:30:10.5+00:00

I am extracting the date out of the names of XML flies stored in a Blob container. I use the Get Metadata activity to get the name of the name of all files in the folder, which works fine. I then start a ForEach activity that rotates through each file. First the name of the file is stored as a variable, which works. Then the date is extracted from the file name with the following function:User's image

Again, this appears to be working. When I run debug mode and check the outputted values, they are all unique (there are no duplicate dates in the list of files).

This then proceeds to a Copy Data activity where the date variable is included as an additional column. I noticed that the date value is wrong for most of the iterations. Out of 25 unique dates, I end up with just 5 unique dates, 2 of which have had multiple files using the same date multiple times.

Is this a format issue with the date (the original file names have the format filegroup--yyyy-mm-dd.xml)? Is there something wrong with how I am using the ForEach in association with the variables that is causing them to be retained?

I have tested out an assortment of different datetime formats btw and seen the same issues, though oddly with a different assortment of dates being repeated.

Thanks in advance.

Community Center | Not monitored
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.