fork download
  1. using System;
  2. using System.Globalization;
  3.  
  4. namespace ProgramConsole
  5. {
  6. public class Program
  7. {
  8. public static void Main(string[] args)
  9. {
  10. string s = "18-10-2013-20-27-54";
  11. DateTime dt = DateTime.ParseExact(s, "dd-MM-yyyy-HH-mm-ss", CultureInfo.InvariantCulture);
  12. Console.WriteLine(dt);
  13. }
  14. }
  15. }
Success #stdin #stdout 0.05s 33944KB
stdin
Standard input is empty
stdout
10/18/2013 8:27:54 PM