fork(24) download
  1. using System;
  2. using System.Globalization;
  3.  
  4.  
  5. namespace Enum
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. string s = "Mon Jan 13 2014 00:00:00 GMT+0000 (GMT Standard Time)";
  12. var date = DateTime.ParseExact(s, "ddd MMM dd yyyy HH:mm:ss 'GMT+0000 (GMT Standard Time)'", CultureInfo.InvariantCulture);
  13. Console.WriteLine(date.ToString("yyyy-MM-dd"));
  14. }
  15. }
  16. }
Success #stdin #stdout 0.07s 34912KB
stdin
Standard input is empty
stdout
2014-01-13