bcpy icon indicating copy to clipboard operation
bcpy copied to clipboard

With Pandas DataFrames, DateTimes are giving errors

Open AdsSengupta opened this issue 4 years ago • 0 comments

In my dataframe, I have a line df['Time'] = pandas.to_datetime(df['Time'])

but when i run

bdf = bcpy.DataFrame(df)
bdf.to_sql(sql_table, use_existing_sql_table=True)

and I get

SQLState = 22008, NativeError = 0
Error = [Microsoft][ODBC Driver 17 for SQL Server]Invalid date format

AdsSengupta avatar Jul 09 '20 20:07 AdsSengupta