Hello,
I want to convert a string mm/dd/yyyy into mm/dd/yy.
Can anyone help me with this?
I also want to convert dd-mon-yyyy into mm/dd/yy where mon is the month.
1 Like
Hey @KeertiJ
DateTime.Parse("Jun-06-2019").ToString("MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture) // Output - 06/06/2019
DateTime.Parse("06-Jun-2019").ToString("MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture) // Output - 06/06/2019
DateTime.Parse("06/6/2019").ToString("MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture) // Output - 06/06/2019
Regards…!!
Aksh
4 Likes
Thank you @aksh1yadav it was useful, but can you suggest how to convert ‘yyyy’ into ‘yy’ format ?