Reading CSV and Writing to Excel changes datatype

I have csv file in which Column1 has date and time value (String as column datatype).
I am using read csv to read.

I need to write this in excel. when I use write range. Here, some of the column1 values are storing as system.string and some of them as system.datetime.

Further I need to compare this column(excel) value with today’s date. but it’s showing error since it has two types of data

can anyone know why it is happening like this ?

Hello there,
Not sure this will help but try this out.

its not redirecting

oops my bad.Check now :wink:

it’s not working for me

Your getting errro because of mismatch in the datatype, so how about convert them to same format before checking the condition.

how to convert them to same format.

b’coz if I treat that as string it’s showing “string converter cannot convert date-time format” and vice versa

You just has to parse the date-time string,

Check this post for the reference.
Still same issue them please upload workflow with excel.

Thanks for the reply.

I am unable to share the workflow due to some reasons.

I tried parsing but the error still exists. since the column contains two types of data i.e, system.datetime and system.string.

so when I tried datetime.parse its showing string was not recognized as valid datetime.


Please follow the below tutorial,



@Pavannaik Were you able to solve this issue?