Quantcast
Channel: UiPath Community Forum - Topics tagged error
Viewing all articles
Browse latest Browse all 4384

Date showing in excel and in the data table are different and needs conversion

$
0
0

Hello Team,
I have situation where I have downloaded from a customer portal and the date that is showing in the excel format is DD-MM-YY
image
image
When I extracted the data in Read range then the date shown is in

DataRow { HasErrors=false, ItemArray=object[3] { “91295942”, “5003213532”, [03/22/2021 00:00:00] }, RowError="", RowState=Added, Table=[DataTable] }

I was converting from DD-MM-YYYY to MM-DD-YYYY as per the excel sheet column and this is the parse command I had written.

datetime.ParseExact(row.item(2).ToString,“MM-dd-yyyy hh:m:ss”,system.Globalization.CultureInfo.InvariantCulture).ToString(“MM/dd/yyyy”)

If I don’t add the .ToString then I get an error.

option strict on disallows implicit conversions from ‘object’ to 'string’

else

Message Box: String was not recognized as a valid DateTime.

Need your helping hand.

Regards,
Manjesh

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 4384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>