I have this date format yy/MM/dd HH:mm:ss ex: 12/02/21 10:56:09. The problem is, when i try to convert it to different format using this code:
yy/MM/dd HH:mm:ss
12/02/21 10:56:09
Try this:
DateTime.ParseExact("12/02/21 10:56:09", "yy/MM/dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture).ToString("MMM. dd, yyyy HH:mm:ss");