Convert date

I obtained a date with the Get Value activity. I want to convert the obtained value 23-08-2017 into a date.Format: dd-MM-yyyy.
I already tried some options, like Convert.DateTime(“ Variable”).toString etc.
Also Parse Exact, but both without succes. I want to use the obtained (converted) date to compare it with other.
Does someone have a solution or several. As long as they work.
Thank you in advance.

Take a look at this: Custom date and time format strings | Microsoft Learn
Remember that the language is .net we can use all your resources

Hi, i guess your date now is in string format - var
Now you can convert string into datetime format
DateTimeVariable =DateTime.ParseExtract(var,“dd/M/yyyy”,System.Globalization.CultureInfo.CurrentUiCulture.DateTimeFormat)

Data type of DateTimeVarible should be DateTime

Thank you for your response.
I already tried the options you mentioned.
I’ll check step by step if all de variables and arguments are OK.
Then try again.
I’ll let you know if it die work.

1 Like

Good Thanks.

Hi,

Check the attached XAML you will some idea to convert date to your required format.DateFormatConverter.xaml (6.4 KB)