using System.Collections.Generic;
using System.Globalization;
public static void Main()
DateTime currentDate = DateTime.Now;
string format = "dd-MM-yy HH:MM tt";
string formatedDateTime = currentDate.ToString(format, CultureInfo.InvariantCulture);
Console.WriteLine("formatted DateTime :{0}", formatedDateTime);