Read CSV data (ID & Date)

Hello,

Here is what I’m trying to do:-

  1. Fetch data from CSV file that has only ID & Date
  2. Enter ID into WebApp UI & Fetch Date2
  3. If Date > Date2 then Take action else goto next ID

Issue:-
When fetching the date from the CSV file and printing it in writeline, it shows 1/1/0001 12:00:00 AM. However the date is in mm/dd/yyyy format in CSV.

Approaches tried so far:-

  1. Excel Loop for CSV file, Use Text datatype for Date column, Add data in datatable, Advanced Loop to print values
  2. Excel Loop for CSV file, Use DateTime datatype for Date column, Add data in datatable, Advanced Loop to print values
  3. Convert CSV to XLSX, Excel Loop for XSLX file, Use Text datatype for Date column, Add data in datatable, Advanced Loop to print values
  4. Convert CSV to XLSX, Excel Loop for XSLX file, Use DateTime datatype for Date column, Add data in datatable, Advanced Loop to print values

All of the above approaches show the same result for date i.e. 1/1/0001 12:00:00 AM. Please note that when converting from CSV to XLSX, the resulting excel file has the date column values in the ‘Date’ format.

Could you please help? I just want to fetch the date (mm/dd/yyyy format) and not date and time both.

Hi,

Try using Advanced Loop activity.

Regards,
Amit Anand

Hi Amit,

Thank you very much for your response.
I will test it today and let you know the results. Just a follow-up question. We need to run the process on bot server and the CSV file will be updated frequently. Would this cause any issues in the Advanced Loop?

Regards,
Apoorva

Hi,

No, As long as path and columns of the csv file remain intact.

Regards,
Amit Anand