Date format change in string

Hello, I have a doubt. How can i change a date given to me in “10th Jun 2022” to the system format"10-06-2022".(date given to me is in a variable)

Hi @Subin_Saji,

Welcome to community.

value = “10th Jun 2022”

Convert.ToDateTime(value.Replace("th","")).ToString("dd-MM-yyyy")

This will work for you.

Regards,
MY

1 Like

Hello @Subin_Saji

If you want to go with the activity you can use Format value activity. You can change to any format. Make sure the input is a standard datetime format.

1 Like

Thank you,It worked.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.