Here is the modified one,
DateTime.ParseExact(Str1, ("MM-dd-yyyy"), System.Globalization.CultureInfo.InvariantCulture).toString("MMMdd, yyyy")
Check the below image for better understanding,
DateTime.ParseExact(Pass Variable here, (“Give Present Format
here”),System.Globalization.CultureInfo.InvariantCulture).toString(“Give Required format here”)
Hope you understand!!
