How to convert date format 30th Sep '20 and 1st Feb '20 to dd/MM/yyyy

How to convert date format 30th Sep '20 and 1st Feb '20 to dd/MM/yyyy

Check this below code, @praseed
Cdate(“30th Sep '20”.Replace("’","").Replace(“th”,"").Replace(“st”,"")).ToString(“dd/MM/yyyy”)

Hope this may help you :slight_smile:

2 Likes

You can try this @praseed
DateTime.ParseExact(yourString.Trim,“dd MMM yy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

1 Like

It worked…Thanks

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