Hi Team,
The scenario is I am getting the values from an excel file and storing as variable of type generic value.
Now when, I am trying to format the Generic value to date time MM/dd/YYYY then getting an error as Format Value: Cannot convert Generic Value to System.DateTime
Read data from excel in a string type variable.
To do that go to the variables pane in the studio and change the variable type.
Now to parse the date use this in a assign if the input is in MM/dd/yyyy format only:
DateTime.ParseExact(yourvariable, “MM/dd/yyyy”(This is your input date value format), System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat).ToString(“MM/dd/yyyy”)
The variable to which you will assign this above statement’s value(the output) that should be a DateTime variable