Change the date format from 01st October 2022 into required date format


Kindly request to help to convert the date formatted as 01st October 2022 into 01-10-2022 using uipath

Thanks in advance


Welcome to the forums

It’s better if you can provide more information by adding screenshots or Input file and required output

Also check below for your reference



Hi @Sakthi_Rubini_S1 ,
Assuming the date string value is present in a varaible like below :

strDate = "01st October 2022"

Could you Check the Below Expression :

DateTime.ParseExact(Regex.Replace(strDate,"(\d+)(.*?)\s+(\w+)\s+(\d+)","$1 $3 $4"),"d MMMM yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy")

Thanks a lot. it worked

1 Like