Pavannaik
(Pavan)
December 27, 2017, 12:06pm
1
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 ?
ddpadil
(Dilip)
December 27, 2017, 12:28pm
2
Hello there,
Not sure this will help but try this out .
ddpadil
(Dilip)
December 27, 2017, 12:53pm
6
Your getting errro because of mismatch in the datatype, so how about convert them to same format before checking the condition.
Pavannaik
(Pavan)
December 27, 2017, 1:14pm
7
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
ddpadil
(Dilip)
December 27, 2017, 1:18pm
8
You just has to parse the date-time string,
Check this post for the reference.
Still same issue them please upload workflow with excel.
Pavannaik
(Pavan)
December 28, 2017, 7:08am
9
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.
hi,
Please follow the below tutorial,
Thanks,
karthik
2 Likes
harsh497
(Harshit Goyal)
June 21, 2019, 12:54pm
11
@Pavannaik Were you able to solve this issue?