Hi All ,
i have an issue in converting a value from excel in to date time. For some reason excel is saying to UiPath that the given value in a cell is in mm/dd/yyyy… though am using the following statement
datetime.ParseExact(item.Substring(0,item.Length-9),“dd/MM/yyyy”,System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat).Date.ToShortDateString
note : the substring function is used to trim the last 9 characters which has hh:mm:ss.
now though the above instruction is saying "what ever may be the “item” is , just convert first 2 as day second 2 as month an third 4 as year , the excel is saying the first 2 is month .
so if i give something like 13/01/2021 then this conversion itself throws an error. how ever this error do not happen when we change that type of the particular column of the excel into “text”.