// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Globalization; using System.Threading; namespace E { public class Program { public static void Main(string[] args) { string s = "09/04/2012 08:39:49"; Console.WriteLine(DateTime.Parse(s).ToString("dd-MMM-yyyy HH:mm:ss")); Thread.CurrentThread.CurrentCulture = new CultureInfo("da-DK", false); Console.WriteLine(DateTime.Parse(s).ToString("dd-MMM-yyyy HH:mm:ss")); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false); Console.WriteLine(DateTime.Parse(s).ToString("dd-MMM-yyyy HH:mm:ss")); } } }