I’m a beginner to developing bots in studio and I have a problem I was hoping someone could help with.
I’m using an assign activity in a ‘For Each Row’ loop to run through my datatable capture an existing date from a particular column and then assign this date to different column in the datatable. The problem is my output is in the date format MM/dd/yyyy and I require it to be dd/MM/yyyy.
After searching for solutions using DateTime.ParseExact seems to be the most popular method but I am encountering a compiler error. The error message states ‘Globalization’ is ambiguous, imported from the namespaces or types ‘System.Web, System’.
My datatable does not have column headers so I am referencing the data using row(). Please see my code below.
row(16) = DateTime.ParseExact(row(4),“MM/dd/yyyy”, Globalization.CultureInfo.InvariantCulture).Tostring(“dd/MM/yyyy”)
I have added System.Globalization to the imported namespaces in Studio but still have the error. Can anyone help suggest a solution please?