I believe that “HH” means 24-hour time, and “hh” means 12-hour time.
Try the following:
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortTimePattern = "HH: mm: ss"
System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern = "HH: mm: ss"
Jamie source
share