I have a excel file which has column “Refer Date”, the number of rows in the excel file could be 500k-800k~.
The format in the date column is very inconsistent
examples of date which are present in “Refer Date” column are mentioned below(it consists many formats like M/D/YYYY, MM-D-YYYY, OADate format etc. refer below)
You can simply add the any number of date formats inside the {“”,“”} and the formats should be separated by comma
The above expression will look into array of string and choose the apt format as per the input string and convert them and return you the output of desired format.
Thanks for the reply, but specific to OADate you mentioned we can you use regex, can you please elaborate on that how can we use it in expression, for N/A we can leave it.
Also, how can be use it on all of the data as we have 500k~ + rows.
Here one option is to use the Format cells activity with a loop. But if the format is static for the excel, then better you can create an Excel template with the required formats to the columns and then write the datatable to that excel. It will help to preserve format for all the columns as per our requirement.