"Exception has been thrown by the target of an invocation" error when writing file creation time to datarow

Hello, I am getting the following error when I am trying to write the creation time (HH:mm:ss) of a file to a datarow
image
The Assign activity that gives the error is :
image -> LogRow(“Time_Created”) = CreationTime,
CreationTime = NewFileInfo(CurrentFile).CreationTime.ToString(“HH:mm:ss”,globalization.CultureInfo.GetCultureInfo(“nl-BE”))

Why am I getting this error for this activity? I do not get an error when I write the creation date…

Edit: I confirmed to make sure that the column Time_Created exists and does not have any spaces.

Hi,

Can you try using column index number instead of column name to isolate the its cause?
If it works in case of column index, perhaps you should extract column name from the datatable and compare it with your string.

Regards,

Hi
may i know where this activity placed in like is it within FOR EACH activity
or
try like this
datatable.Rows(datatable.Rows.IndexOf(LogRow))(“Time_Created”) = CreationTime.ToString

Cheers @Hisuhong

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.