0

I want to read mdb file to memory. but there are some difference between source data and memory data

Here are code

import pyodbc
import pandas as pd
import datetime
DB_Connection = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ=./test_Time.mdb' )
DF_SaveData = pd.read_sql( 'SELECT * From SaveData',DB_Connection,parse_dates=True).sort_values(by='Date_Time',ascending=True)
print(DF_SaveData)

mdb data time : 2021-03-22 AM 8:45:46 result time : 2021-03-22 AM 8:45:45

1 second error...

  • Most likely, your source dates have a millisecond part which, by Access, is rounded by 4/5 to the second, elsewhere cut off. – Gustav Apr 19 '21 at 07:25
  • If source is mdb file, how can there be millisecond part? – June7 Apr 19 '21 at 16:59

0 Answers0