DateTime Format: %h
using System; using System.Globalization; public class Example { public static void Main() { DateTime dat1 = new DateTime(2009, 6, 15, 13, 45, 0); Console.WriteLine("'{0:%h}'", dat1); Console.WriteLine("'{0: h}'", dat1); Console.WriteLine("'{0:h }'", dat1); } } /* '1' ' 1' '1 ' */