I obtained a date with a GetValue activity. Now I want to convert into a real date dd-MM-yyyy format. I want to compare tT=he obtained (converted date(

I have a string in dd/mm/yyyy format. I just need to convert it to DateTime type.
No success using below,
DateTime(ParseExtract(“15/6/2018”, “dd/MM/yyyy”,System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat)

Error:Assign : String was not recognized as a valid DateTime.

DateTime.ParseExtract(“15/6/2018”, “dd/MM/yyyy”,System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat) will work if you use the correct date format as follows

DateTime.ParseExtract(“15/6/2018”, “dd/M/yyyy”,System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat)
DateTime.ParseExtract(“15/06/2018”, “dd/MM/yyyy”,System.Globalization.CultureInfo.CurrentUICulture.DateTimeFormat)

you can get custom Date and Time format here

For more info about Date time Conversion please refer here

1 Like