title: How to convert "double" to "datetime" between Excel and c#
body: <p>I have a c# program which needs to create an excel object, and do some operations, 
  here are parts of my code:</p>
  
  <pre><code>// c# code:
  
  workSheet.Cells[1, 1] = "=2012/9/20";       //asign "2012/9/20" to cell[1,1] in Excel
  double d = workSheet.Cells[1, 1].value();   // by default, Excel will return 11.17
  Debug.Print(d.ToString());                  //c#:  d = 11.1777777777778
  </code></pre>
  
  <p>so how to make the output become "2012/9/20" again?</p>
  
  <p>I have tried some codes, but fail:</p>
  
  <pre><code>DateTime str = DateTime.FromOADate(d);     //c#: str = 1/10/1900 4:16:00 AM
  DateTime str = new DateTime((long)d);      //c#: str = 1/1/0001 12:00:00 AM
  </code></pre>