Create a DateTime Array from Excel Data

Hi, I am basically trying to find out the previous workday, and I have the basic workflow for now. The issue I am facing now is that I want to transfer the “date” from a column in excel into an array of datetime (type). Most of the time I am facing variable type issues, and I am really confused about the rules of changing variable types.

I have tried the following method:
Read column => build data table ==> assign a new collection ==> add each item into collection. However, I can not transfer the variable type to the correct type.

Is there anyone who has a better idea about changing variable types or has similar experience of creating a DateTime array from excel datatable?


You can try Datetime.ParseExact to convert the string into a datetime variable then add that to an array.

Just for the update.
I decided to read range from Excel and output the datatable (output datatable activity will make the output string). Then, I just check whether the datatable contains the date (in string type) in order to select the right date.