title: How to convert Java.Util.Date to System.DateTime
body: <p>In Xamarin.Android, you work with both .NET and Java.</p>
  
  <p>I get a return value of Java.Util.Date, I then need to input that same value as a parameter that only takes System.DateTime</p>
  
  <p>This is how I currently do it</p>
  
  <pre><code>public static DateTime ConvertJavaDateToDateTime(Date date)
  {
      var a = date.ToGMTString();
      var b = date.ToLocaleString();
      var c = date.ToString();
      DateTime datetime = DateTime.ParseExact(date.ToGMTString(), "dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture);
      return datetime;
  }
  </code></pre>
  
  <p>However on the first 9 days of any month, I only get 1 digit for the day, and the 
  DateTime.ParseExact function is looking for dd (i.e. 2 digits for the day).</p>
  
  <p>a is a string with value "1 Sep 2014 14:32:25 GMT"</p>
  
  <p>b is a string with value "1 Sep 2014 16:32:25"</p>
  
  <p>c is a string with value "Mon Sep 01 16:32:25 EET 2014"</p>
  
  <p>I wish I could find a simple, quick, reliable and consistent solution for this problem :D</p>