I am reading data from my date column from excel file in the format ( mm/dd/yyyy) & (m/dd/yyyy), spliting it in mm/yy format and again writing in new column.
I am getting error message as " String was not recognized as valid datetime".
Although uipath writes data in my first column.
I need to split " Transaction Date" as mm/yy or m/yy and write to column “Period1”
Arun : When I am using date parser in the format : M/dd/yyyy, I am able to read first row and write data correctly. In the second row it reads date and before writing, it gives error of datetime format.
If I use date parser as : MM/dd/yyyy, it reads the date from first row and before writing it is giving error.
Can you try this function when convert string into Datetime
“DateTime.ParseExact(x1, “M/d/yyyy”, System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat)” Main.xaml (9.8 KB)
Kindly let me know the outcome.
Hello, Here is workaround… try to split date into two parts mm and yyyy using Split method and then use the Substring method to get only 2 value from year. For better understanding, go through the video. Split and Substring in UiPath