Hello,
I am using Get Row Item activity to get value from Data table which read from Excel file, but while reading with String it is not giving output and with Generic value gives output in general format which I want to convert into Date and time format.
Excel Actual Value - 1/10/2023 12:00:00 PM
while reading with Generic value - [44936.7083333333]
So, when I am trying to convert from Generic value to Date gives error as - Assign: String was not recognized as a valid DateTime.
I tried with below code
My simple requirement is read Excel cell value one by one as it is without changing any format.
With Date & Time type -
Get Row Item: DateTimeConverter cannot convert from System.Double.
With String type -
Get Row Item: StringConverter cannot convert from System.Double.
Hi @nilesh.mahajan ,
If the datetime format you are getting from get text is in this format dd\MM\yyyy assigned to timeValue variable of type generic
use like this buddy dateVar = Datetime.ParseExact(timeValue.ToString,“dd\MM\yyyy”,System.Globalization.CultureInfo.InvariantCulture)
or if that get text value is in this format dd-MM-yyyy assigned to timeValue variable of type generic
use like this dateVar = Datetime.ParseExact(timeValue.ToString,“dd-MM-yyyy”,System.Globalization.CultureInfo.InvariantCulture)