fork(33) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var dateStr = "12/29/2012 09:55:00 AM";
  8. DateTime date = DateTime.ParseExact(dateStr,"MM/dd/yyyy hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);
  9. System.Console.WriteLine(dateStr);
  10. }
  11. }
Success #stdin #stdout 0.06s 33968KB
stdin
Standard input is empty
stdout
12/29/2012 09:55:00 AM