Convert Date - String without slashes -YYYYMMDD to MM/dd/yyyy

I have the Date as : image YYYYMMDD is the format used .
How can I convert it to MM/dd/yyyy
I am using the following workflow:

I am getting the following error:

Check this below code, @Rachita_Chauhan
DateTime.ParseExact(“20210201”,“yyyyMMdd”, System.Globalization.CultureInfo.InvariantCulture).ToString(“MM/dd/yyyy”)
Hope this may help you :slight_smile:

Thanks for replying, still getting the same error:image

Remove the double quotes from “yyyyMMdd” and re add it double quotes to this - yyyyMMdd. and do processDate.Trim @Rachita_Chauhan

1 Like

Thanks a ton!! It had spaces, now it worked!!!

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