title: ADODB Excel Database - Date Format Issue
body: <p>I am currently using the below script below to retrieve data from another Excel workbook.  I retrieve the proper date in proper format.  The problem occurs when the workbook that i am querying is "OPEN" the retrieved data "DATE" returns a NUMBER "49802"(something like that) but as soon as i close the workbook that i am querying the returned "DATE" become normal format.</p>
  
  <pre><code>Sub Pull_Data_from_Excel_with_ADODB()
  
  Dim cnStr As String
  Dim rs As ADODB.Recordset
  Dim query As String
  Dim var1
  Dim var2
  var1 = Now() - 1
  var2 = Now()
  Dim fileName As String
  fileName = "C:\Signin-Database\DATABASE\Signin-Database.xlsm"
  
  cnStr = "Provider=Microsoft.ACE.OLEDB.12.0;" &amp; _
         "Data Source=" &amp; fileName &amp; ";" &amp; _
         "Extended Properties=Excel 12.0"
  
  
  query = "SELECT * FROM [Sheet1$D:H] WHERE [Time_in] &lt; '" &amp; var2 &amp; "' AND [Time_in] &gt;  '" &amp; var1 &amp; "' AND [Time_out] is null"
  
  Set rs = New ADODB.Recordset
  rs.Open query, cnStr, adOpenUnspecified, adLockUnspecified
  
  Cells.Clear
  Range("A2").CopyFromRecordset rs
  
  Dim Cell As Range, i As Long
  With Range("A1").CurrentRegion
  For i = 0 To rs.Fields.Count - 1
      .Cells(1, i + 1).Value = rs.Fields(i).Name
  Next i
  .EntireColumn.AutoFit
  
  
  
  
  
  End With
  </code></pre>